Re: com php-src: Fix spl_directory cast_object, reenable error: Zend/zend_execute.h ext/spl/spl_directory.c
| From: | Nikita Popov | Date: | Tue, 13 May 2014 16:44:05 +0000 |
| Subject: | Re: com php-src: Fix spl_directory cast_object, reenable error: Zend/zend_execute.h ext/spl/spl_directory.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-78317@lists.php.net to get a copy of this message | ||
On Mon, May 12, 2014 at 10:01 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> got it. but it mean that any internal class might need be changed to avoid
> this warning.
> May be you can think about a better place for this warning?
>
> Thanks. Dmitry.
>
I'm not sure what else this error can go. This error that is triggered by
all our casts (zendi_convert_to_*, convert_to_*, convert_to_*_ex,
zval_get_*, zend_make_printable_zval). It was only missing from
zend_is_true in particular. Why should be make an exception for it?
If a cast_object handler didn't handle IS_BOOL correctly, then it was just
luck that an error was never encountered - it means that it was only used
in if($obj) or similar, but never as (bool)$obj etc. However, the fact that
nobody encountered the issue, because convert_to_boolean codepaths are used
more rarely, does not mean that the issue didn't exist. So the cast_object
handler would have to be fixed anyway - now it's just more likely that the
issue will be actually found.
Anyway, I just checked the code for all exts overwriting cast_objects (gmp,
sxe, com, tidy, spl_directory) and it looks correctly handled everywhere
now :)
Nikita