-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Error Deprecated Functionality plugin magento zendframework1 #36069
Comments
Hi @mohammedTBB. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-Dash. Thank you for working on this issue.
|
Hi @mohammedTBB , We are trying to reproduce the issue in 2.4.5 magento instance....But we are not able to reproduce the issue. Steps: Let us know if we missing anything! Thanks!!! |
Maybe the Anowave E-commerce 3rd party package script (i.e. CrashReporter.php) detects an issue that triggers a call to Zend/DbStatement.php... which in turn then executes the deprecated functionality in M2 zendframework? Perhaps wouldn't be reproduceable unless Anowave EC extension tries to report the "crash". We've had a several of that kind of circumstance in debugging php8.1 compatibility issues in 3rd party extensions: fix the first bit of deprecated code, test and that reveals a new one downstream... rinse and repeat. |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @mohammedTBB, Thanks for the report and collaboration! We have checked this issue in the Magento 2.4.5, 2.4.4, and 2.4-develop branches. And also examine the file
is already there in line no. Hello @n2diving-dgx, Can you please suggest a way to reproduce the issue? Does we need to install the Thanks |
@engcom-Hotel: if you read the error message carefully, you'll see that the error happens on line 222. So this most likely means that the second Also, we have a third |
Hello @engcom-Hotel yes there is check in line 201 but then the value of $sql changed. what worked for us is adding the check at line 222 to reproduce the error it is essential to have the plugin amasty google rich snippets, what seems to happen that the plugin amasty google rich snippets calls a zendfremwork funcion where the error happen. |
Hello @hostep @mohammedTBB, Thanks for the reply! I agree with your point @hostep, we need to add the checks after each I have also gone through the preg_replace documentation, it can be returned as Hence confirming the issue. Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-6632 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
@mohammedTBB @hostep @n2diving-dgx does anyone of you know how to reproduce this issue? From what I can read, it does not always occur? I have the same situation for a client. |
@hostep the error sometimes occurs on production. But the problem for me is that I don't know how to reproduce this locally. Any ideas? |
The only thing I can think of, is to patch the code on production with some extra lines that try to detect this occurrence and add a bunch of logging to try to see what the |
I stumbled across this recently. If you go to the Customer Grid in the admin and search: You create an exception that stems from the same problem. Note that you may hit a server error if the request URI is too long. You may need to adjust server config. You have to be in production mode or have error reporting off because of a check done here:
Exception:
|
I hit the same issue but on a different case. I have magento 2.4.5. This breaks the rollback of the database so I think is critical. At the moment I cannot restore my database! |
Hello @mohammedTBB, The issue is still relevant, tried the steps mentioned in this #36069 (comment), but it seems the issue does not belong to this repo. It should be created in https://github.com/magento/magento-zend-db repo. After checking found a similar issue here in that repo: I think we can close this issue from here. |
Hi @engcom-Hotel thanks for trying to reproduce the error and for this information. |
Preconditions and environment
Steps to reproduce
1- Go to category page
2- Choose a product and go to product page (not all products)
Expected result
No error
Actual result
Exception #0 (Exception): Deprecated Functionality: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /vendor/magento/zendframework1/library/Zend/Db/Statement.php on line 222
Additional information
Possible solution:
Need to add this check after each
preg_replace
call i.e.210
&222
.The simplest way to reproduce this issue is by setting
$sql
asnull
and then runningbin/magento setup:upgrade
command. The below error will occur:Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: