LWN.net Logo

Fun with PHP releases

The PHP team has rushed out the 5.3.8 release to fix a 5.3.7 bug that broke crypt() for a lot of users. But it turns out that there is another problem: the behavior of is_a() has changed, with the results that (1) the autoloader can be triggered, and (2) the return value can change. This change appears to have caused problems with PEAR, at least; users may want to be careful about upgrading to this release.
(Log in to post comments)

Fun with PHP releases

Posted Aug 25, 2011 5:36 UTC (Thu) by smurf (subscriber, #17840) [Link]

Cute.

For reference, is_a(A,B) used to check for "is A an instance of B". Previously, if A was a string then it's not an object so the test failed. Now, they say "well, if A is a string then it might name an object, so call the autoloader."

This is precisely the kind of nonsense automagic non-feature which has caused countless security fiascos in PHP's past and will doubtlessly cause more in the future.

It's also the reason why any PHP whatsoever is required, on my web servers, to run inside a heavily-shielded single-user fastcgi sandbox. No exceptions.

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds