summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_execute.h3
-rw-r--r--ext/spl/spl_directory.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 0007e98e67..52689d2d6a 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -115,8 +115,7 @@ again:
break;
}
- // TODO: The following line breakes phar ???
- // zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to boolean", Z_OBJ_P(op)->ce->name->val);
+ zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to boolean", Z_OBJ_P(op)->ce->name->val);
} else if (Z_OBJ_HT_P(op)->get) {
zval rv;
zval *tmp = Z_OBJ_HT_P(op)->get(op, &rv TSRMLS_CC);
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 8cc7ec0b6d..f7a1de4c07 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1881,6 +1881,9 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type TS
}
return SUCCESS;
}
+ } else if (type == _IS_BOOL) {
+ ZVAL_TRUE(writeobj);
+ return SUCCESS;
}
if (readobj == writeobj) {
zval_dtor(readobj);