Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixed #65213 - cannot cast SplFileInfo to boolean
This commit is contained in:
Tjerk Meesters 2014-12-04 07:18:33 +08:00
commit 52b41f24e3
2 changed files with 16 additions and 0 deletions

View File

@ -1907,6 +1907,9 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type TS
}
return SUCCESS;
}
} else if (type == IS_BOOL) {
ZVAL_BOOL(writeobj, 1);
return SUCCESS;
}
if (readobj == writeobj) {
zval_dtor(readobj);

View File

@ -0,0 +1,13 @@
--TEST--
Bug #65213 (cannot cast SplFileInfo to boolean)
--FILE--
<?php
$o = new SplFileInfo('.');
var_dump((bool) $o);
?>
===DONE===
--EXPECT--
bool(true)
===DONE===