bug: find and fix easy php warnings, deprecations or errors
Describe the bug
review these type of php issues in the main demos php error log and then open a PR with a fix :)
[30-Jul-2024 08:20:14 UTC] PHP Deprecated: Creation of dynamic property OpenEMR\Common\Auth\OAuth2KeyConfig::$cryptoGen is deprecated in /var/www/localhost/htdocs/openemr/src/Common/Auth/OAuth2KeyConfig.php on line 51
I would like to work on this
Hello i want to work on this
Hi, is it possible if I can work on this too?
hi @migumnakkittikul , definitely ok. go for it
This may help. It's a shell script that fetches the log, removes the debug throttling lines, removes the timestamps, and deduplicates the remaining entries without changing their order. (Sorting would make the tracebacks much harder to read.)
It isn't perfect, but I think it's a good blend of simple and functional.
curl https://demo.openemr.io/log/logPhp.txt |
grep -vF 'DEBUG: throttling' |
sed -e 's/^\[[^]]*] //' -e 's/^\[[^]]*]//' |
awk '!s[$0]++'
Looking at this log, I am beginning to wonder how many of these warnings and errors are due to someone (or somebot) directly requesting a url to a php file that is intended to be included in another page instead of run directly.
Issues from reducedLog.txt analysis
Found and reported the following PHP warnings/errors from log analysis:
- [ ] #9470 - Undefined $tokens array in RxList::parseToTokens() (HIGH priority - hundreds of warnings)
- [ ] #9471 - Undefined variables in find_code_dynamic_ajax.php when $what == 'codes'
- [ ] #9472 - Undefined array keys in CAMOS form
- [x] #9459 - Multiple undefined array key/variable warnings in transfer_summary form (already reported)
Also added comment to #9451 documenting 4 additional files needing direct access guards.
Alrighty, I believe I've accounted for all the issues that I saw in the logs yesterday that I can't rule out were already fixed in 7.0.4. I created issues for all of them, and made them sub-issues of this ticket for tracking. There may be new issues in future logs, especially because #9451 can't be solved until openemr has a front controller, but we can definitely tackle a bunch of these.
@stephenwaite what do you think about closing this ticket once all the subtasks are done, and creating a new one when we have updated all the demo stuff and are tracking new logs for the future release?