Skip to content

Commit eb04cb5

Browse files
committed
Move checks after zpp in opcache_is_script_cached()
1 parent 80b4d49 commit eb04cb5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/opcache/zend_accelerator_module.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,10 @@ ZEND_FUNCTION(opcache_is_script_cached)
909909
{
910910
zend_string *script_name;
911911

912+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &script_name) == FAILURE) {
913+
RETURN_THROWS();
914+
}
915+
912916
if (!validate_api_restriction()) {
913917
RETURN_FALSE;
914918
}
@@ -917,9 +921,5 @@ ZEND_FUNCTION(opcache_is_script_cached)
917921
RETURN_FALSE;
918922
}
919923

920-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &script_name) == FAILURE) {
921-
RETURN_THROWS();
922-
}
923-
924924
RETURN_BOOL(filename_is_in_cache(script_name));
925925
}

0 commit comments

Comments
 (0)