com php-src: Fixed fileinfo behaviour.: ext/fileinfo/fileinfo.c

From: Date: Sun, 15 Mar 2015 14:54:49 +0000
Subject: com php-src: Fixed fileinfo behaviour.: ext/fileinfo/fileinfo.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86002@lists.php.net to get a copy of this message
Commit: 78ebf83ad3299bdb2617da60c9be68ce2cf33fb4 Author: Danack <Danack@basereality.com> Sun, 15 Mar 2015 14:54:49 +0000 Parents: 0922eca0c7fd6864b4b631a48ff366ed10bc24ca Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=78ebf83ad3299bdb2617da60c9be68ce2cf33fb4 Log: Fixed fileinfo behaviour. Changed paths: M ext/fileinfo/fileinfo.c Diff: diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index b4a556d..33c67d1 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -301,8 +301,18 @@ PHP_FUNCTION(finfo_open) php_fileinfo *finfo; FILEINFO_DECLARE_INIT_OBJECT(object) char resolved_path[MAXPATHLEN]; + zend_error_handling zeh; + int rv; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lp", &options, &file, &file_len) == FAILURE) { + if (object) { + zend_replace_error_handling(EH_THROW, NULL, &zeh TSRMLS_CC); + rv = zend_parse_parameters(ZEND_NUM_ARGS(), "|lp", &options, &file, &file_len); + zend_restore_error_handling(&zeh TSRMLS_CC); + } else { + rv = zend_parse_parameters(ZEND_NUM_ARGS(), "|lp", &options, &file, &file_len); + } + + if (rv == FAILURE) { FILEINFO_DESTROY_OBJECT(object); RETURN_FALSE; }

« previous php.cvs (#86002) next »