From: Marcus Boerger Date: Tue, 20 Feb 2007 13:08:01 +0000 (+0000) Subject: - Make stat based functions throw an exception X-Git-Tag: php-5.2.2RC1~353 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f44b63c57f4c9dff4224e719ead60136506bdfcf;p=php - Make stat based functions throw an exception --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 0cd440c758..4847f65edb 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -679,8 +679,10 @@ SPL_METHOD(SplFileInfo, func_name) \ { \ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ \ + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);\ spl_filesystem_object_get_file_name(intern TSRMLS_CC); \ php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \ + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);\ } /* }}} */