com php-src: Move checks after zpp in opcache_is_script_c ached(): ext/opcache/zend_accelerator_module.c

From: Date: Wed, 22 Jul 2020 08:52:50 +0000
Subject: com php-src: Move checks after zpp in opcache_is_script_c ached(): ext/opcache/zend_accelerator_module.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-112309@lists.php.net to get a copy of this message
Commit: eb04cb5f2016bf46c667caca088363278c5dfbfc Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 22 Jul 2020 10:52:34 +0200 Parents: 80b4d49f90b7cb974fa87bf54068086424932b72 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eb04cb5f2016bf46c667caca088363278c5dfbfc Log: Move checks after zpp in opcache_is_script_cached() Changed paths: M ext/opcache/zend_accelerator_module.c Diff: diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 1595ea4e38..2e0d5e4415 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -909,6 +909,10 @@ ZEND_FUNCTION(opcache_is_script_cached) { zend_string *script_name; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &script_name) == FAILURE) { + RETURN_THROWS(); + } + if (!validate_api_restriction()) { RETURN_FALSE; } @@ -917,9 +921,5 @@ ZEND_FUNCTION(opcache_is_script_cached) RETURN_FALSE; } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &script_name) == FAILURE) { - RETURN_THROWS(); - } - RETURN_BOOL(filename_is_in_cache(script_name)); }

« previous php.cvs (#112309) next »