mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
Merge branch 'PHP-5.6'
Conflicts: ext/opcache/zend_accelerator_module.c
This commit is contained in:
commit
ed43b7a548
17
ext/opcache/tests/bug69281.phpt
Normal file
17
ext/opcache/tests/bug69281.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Test that script cached info is correct with validate_timestamps disabled
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.validate_timestamps=0
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(opcache_is_script_cached(__FILE__));
|
||||
var_dump(opcache_is_script_cached("nonexistent.php"));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
@ -4,6 +4,7 @@ Test that script cached info is correct
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.validate_timestamps=1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
@ -292,7 +292,11 @@ static int filename_is_in_cache(zend_string *filename)
|
||||
handle.filename = filename->val;
|
||||
handle.type = ZEND_HANDLE_FILENAME;
|
||||
|
||||
return validate_timestamp_and_record(persistent_script, &handle) == SUCCESS;
|
||||
if (ZCG(accel_directives).validate_timestamps) {
|
||||
return validate_timestamp_and_record(persistent_script, &handle) == SUCCESS;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user