-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xception: Deprecated Functionality: preg_replace(): Passing null to parameter #3 ($subject) of type array|string #66
Comments
In my case, I was hitting |
#68 fixes this |
I appreciate your willingness to fix this, but |
Where were you hitting it? I checked for an error after line 330 and in my case there was no PREG stack limit error there. |
On line 328. Weird; |
You are right. Mine is hitting here:
It seems like this regexp may need to be rewritten as it can quickly exhaust the backtrack limit depending on the input string. But looking at the outstanding bugs and pull requests I'm not sure if this project has been abandoned or not? |
That's the same conclusion I came to. Even breaking the regex apart into two parts doesn't resolve the fact that it's exhausting the stack frame limit. I did alter the regex to get it working, but it no longer worked as expected. I ended up switching to |
In my case this package is a dependency of Magento so I'll open a bug with them as they will need to decide whether to address it in this package or switch to a different library. Thanks for the heads up. |
My use case was also Magento. Here's how I replaced this library:
-Ted |
Magento ver. 2.4.4-p6
PHP 8.1.14
Bitbucket : wardenenv/php-fpm:8.1
When we run deploy command : php8.1 bin/magento setup:static-content:deploy
We are getting error :
`Compilation from source app/design/frontend/Vendor/demo/web/css/styles.css failed
Exception: Deprecated Functionality: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in vendor/tubalmartin/cssmin/src/Minifier.php on line 330 in vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler()
#1 vendor/tubalmartin/cssmin/src/Minifier.php(330): preg_replace()
#2 vendor/tubalmartin/cssmin/src/Minifier.php(102): tubalmartin\CssMin\Minifier->minify()
#3 vendor/magento/framework/Code/Minifier/Adapter/Css/CSSmin.php(58): tubalmartin\CssMin\Minifier->run()
#4 vendor/magento/framework/View/Asset/PreProcessor/Minify.php(60): Magento\Framework\Code\Minifier\Adapter\Css\CSSmin->minify()
#5 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Asset\PreProcessor\Minify->process()
#6 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Asset\PreProcessor\Minify\Interceptor->___callParent()
#7 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Asset\PreProcessor\Minify\Interceptor->Magento\Framework\Interception{closure}()
#8 generated/code/Magento/Framework/View/Asset/PreProcessor/Minify/Interceptor.php(23): Magento\Framework\View\Asset\PreProcessor\Minify\Interceptor->___callPlugins()
#9 vendor/magento/framework/View/Asset/PreProcessor/Pool.php(77): Magento\Framework\View\Asset\PreProcessor\Minify\Interceptor->process()
#10 vendor/magento/framework/View/Asset/Source.php(152): Magento\Framework\View\Asset\PreProcessor\Pool->process()
#11 vendor/magento/framework/View/Asset/Source.php(105): Magento\Framework\View\Asset\Source->preProcess()
#12 vendor/magento/framework/View/Asset/File.php(158): Magento\Framework\View\Asset\Source->getFile()
#13 vendor/magento/framework/App/View/Asset/Publisher.php(74): Magento\Framework\View\Asset\File->getSourceFile()
#14 vendor/magento/framework/App/View/Asset/Publisher.php(62): Magento\Framework\App\View\Asset\Publisher->publishAsset()
#15 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\View\Asset\Publisher->publish()
#16 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\View\Asset\Publisher\Interceptor->___callParent()
#17 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\View\Asset\Publisher\Interceptor->Magento\Framework\Interception{closure}()
`
Same things are working fine with PHP 8.1.15 .
please review the issue and let me know how we can fix it.
The text was updated successfully, but these errors were encountered: