Merge branch 'PHP-5.6'

Conflicts:
	ext/opcache/zend_accelerator_module.c
This commit is contained in:
Xinchen Hui 2015-04-02 00:04:30 +08:00
commit ed43b7a548
3 changed files with 23 additions and 1 deletions

View 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)

View File

@ -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--

View 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;
}
}