Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mbstring Requirement #180

Open
matthewknill opened this issue Sep 12, 2023 · 3 comments
Open

Mbstring Requirement #180

matthewknill opened this issue Sep 12, 2023 · 3 comments

Comments

@matthewknill
Copy link

I read that Mbstring is not required for this package, however, I run in to the following error (I don't have the Polyfill either):

<b>Fatal error</b>:  Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() in /var/www/html/vendor/symfony/polyfill-mbstring/Mbstring.php:536
--
  | Stack trace:
  | #0 /var/www/html/vendor/symfony/polyfill-mbstring/bootstrap.php(64): Symfony\Polyfill\Mbstring\Mbstring::mb_strpos('component', '@', 0, 'UTF-8')
  | #1 /var/www/html/vendor/eftec/bladeone/lib/BladeOne.php(2870): mb_strpos('component', '@')
  | #2 /var/www/html/vendor/eftec/bladeone/lib/BladeOne.php(2828): eftec\bladeone\BladeOne::contains('component', '@')
  | #3 [internal function]: eftec\bladeone\BladeOne-&gt;eftec\bladeone\{closure}(Array)
  | #4 /var/www/html/vendor/eftec/bladeone/lib/BladeOne.php(2855): preg_replace_callback('/\\B@(@?\\w+(?:::...', Object(Closure), '@component('com...')
  | #5 /var/www/html/vendor/eftec/bladeone/lib/BladeOne.php(690): eftec\bladeone\BladeOne-&gt;compileStatements('@component('com...')
  | #6 /var/www/html/vendor/eftec/bladeone/lib/BladeOne.php(644): eftec\bladeone\BladeOne-&gt;parseToken(Array)
  | #7 /var/www/html/vendor/eftec/bladeone/l in <b>/var/www/html/vendor/symfony/polyfill-mbstring/Mbstring.php</b> on line <b>536</b><br />
@matthewknill matthewknill changed the title MbString Requirement Mbstring Requirement Sep 12, 2023
@jorgecc
Copy link
Member

jorgecc commented Mar 26, 2024

afaik, it only uses the function if it is defined

                if (\function_exists('mb_strpos')) {
                    if (\mb_strpos($haystack, $needle) !== false) {
                        return true;
                    }

@matthewknill
Copy link
Author

@jorgecc why am I getting the error above then?

@jorgecc
Copy link
Member

jorgecc commented Oct 8, 2024

symfony/polyfill-mbstring is poly-filling it, so it calls its own function, and one of the functions lacks iconv_strpos

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants