Browse Source

Fix spl_directory cast_object, reenable error

pull/673/head
Nikita Popov 12 years ago
parent
commit
8904f72d7c
  1. 3
      Zend/zend_execute.h
  2. 3
      ext/spl/spl_directory.c

3
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);

3
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);

Loading…
Cancel
Save