-
Notifications
You must be signed in to change notification settings - Fork 196
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
Revert undefined property declarations #453
Revert undefined property declarations #453
Conversation
…cally accessed properties
Not tested, but setting the properties to null should work too? (eg |
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.
I completely missed this, thanks for letting me know!
Tested, it would break it as well, as the mentioned code actually accesses |
Two notes here:
PS: anyway, I'm voting for capital punishment to the developer of this class. |
The cause of the break here is that there are classes inheriting from Zend_Pdf_Element which define The other three classes in the original commit are much more specific, and don't suffer the same problem, so it's only that one class we need to be concerned with. Regarding the Zend_Pdf_Element case, it looks like:
That's a pretty confusing mix, and all the solutions I thought of break one child class or another. I guess the safest for now is to revert the change to that file (but not the whole commit). |
…sly magically accessed properties" This reverts commit 38230d5.
This reverts 278bdac (released in 1.24.1), which introduced explicit properties which were previously accessed as magic props through
__get()
.This broke e.g.
Zend_Pdf_Resource_Image_Png#L287
, where$decodingStream->value
was alwaysnull
:while previously (1.23.5) the correct binary image data was accessed through
$decodingStream->_value->value
, e.g. on such a sample object (using Laravel'sdd()
):I hope such breaking changes were not introduced in other commits.
This PR fixes the instantiation of
Zend_Pdf_Image::imageWithPath($path)
- couldn't test the other 3 occurrences where @Fredthelead has introduced similar props in #438 Support for PHP 8.2