-
Notifications
You must be signed in to change notification settings - Fork 800
Anonymous function rewritten as static one to maintain compatibility with PHP 5.2 #293
Conversation
@mhujer I know this is kinda urgent, but it doesn't look like the tests pass on 5.2: https://travis-ci.org/zendframework/zf1/jobs/20264719#L1408 The build will most probably fail anyway because of missing |
No, build on PHP 5.2 for release tag failed mainly because of this anonymous function called from many ZF classes. (It passed before recent security fixes: https://travis-ci.org/zendframework/zf1/builds)
|
@mhujer yeah, the fatal is obvious. Looking into the failing test... |
Fixes #292 - Anonymous function rewritten as static one to maintain compatibility with PHP 5.2
} | ||
return false; | ||
}, E_WARNING); | ||
set_error_handler(array('Zend_Xml_Security', '_loadXmlErrorHandler'), E_WARNING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this can possibly work if _loadXmlErrorHandler
is declared with protected visibility. Going to push through an update that makes it public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- Since it's being invoked as a static callback, the method needs to be public. Renamed to remove the underscore prefix, and marked as public.
- Prior to 5.3, you needed to cast a simplexml node to a scalar in order to do comparisons.
- Discovered on installing PHPUnit to run tests that .gitignore was not setup to ignore composer.lock, nor the files installed in the bin/ directory.
Fixes issues seen in #293
- Since it's being invoked as a static callback, the method needs to be public. Renamed to remove the underscore prefix, and marked as public.
Fixes #292