-
Notifications
You must be signed in to change notification settings - Fork 9.4k
M 2.4.3-p1 - TypeError in AdminSessionsManager.php:338 (strtotime() expects parameter 1 to be string, int given) #34415
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
Comments
Hi @simonmaass. 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. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Possibly regression bug introduced by addition of |
@sidolov, please set priority to P1 |
in general adding the strict_types is a good thing... i guess it should rather be fixed that
isnt returning a string but rather a timestamp as int... |
i have same issue. |
I accidentally ran into a very similar problem on Magento 2.3.7-p2 just now, while trying to login to the backoffice:
Trying to login from an incognito browser does work without issues. This seems to have been caused by the same commit mentioned above where another |
For quick fix, created patch - https://github.com/kanhaiya5590/CRITICAL-TypeError-strtotime-expects-parameter-1-to-be-string-null-given..AdminSessionInfo.php-136 Direct patch access : Its solve my purpose but if Magento provide best fix that will be great. |
@kanhaiya5590 I dont think your patch fixes this error in total in AdminSessionsManager... As far as I can see |
@kanhaiya5590, could you create a pull request? |
Thanks as i was got issue for null but i updated the patch file with an extra condition check Please do share the feedback. |
@sidolov FYI I set priority to P1 as this issue prevents logging in to the admin |
Is there any update on this issue? |
@jgmdigital, |
✅ Jira issue https://jira.corp.magento.com/browse/AC-2505 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Alfa. Thank you for verifying the issue. |
Magento version 2.3.7-p2 has the same issue. |
Can confirm this issue for 2.4.4 still exists |
@kanevbg @simonmaass, unless these changes aren't released yet, you can apply changes from #34514 as a patch. |
@ihor-sviziev I have patched it back then by doing minimalist patch looking at the commit following similar principle (only changed things which matter to the code/logic), and I have applied it with hotfix type of patching in the project, because the original patch (MDVA-42269) was failing in my case. Here is the patch file I use for 2.3.7-p2, in case someone finds it useful: |
@kanevbg the session is still mentioned as expired due to the fact that in patch the value is set to 0 which is checked in I was wondering if you managed to get other clues onto this issue?? |
Confirm same issue on EE 2.4.3-p2 |
Just FYI, this is also an issue in 2.3.7-p4. Does anyone know if/when this issue has been fixed in Magento's core code? |
@christianbookpwood: The code from the PR that fixed this is included in Magento 2.4.5 and higher. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
magento2/app/code/Magento/Security/Model/AdminSessionsManager.php
In this file the line 2.4.3...2.4.3-p1#diff-24fbc4a93c8c25f9ee036f3bf353c3dfca22ee7ff35d0797b6d1c1d7dc012386R6
declare(strict_types=1);
$this->getCurrentSession()->getUpdatedAt() returns int as timestamp... for example 1635087142
Here is the complete trace
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: