summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_persist.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-06 11:00:19 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-06 11:00:19 +0300
commit4bc7ee2eb776b05c8794c2c3abb5f995d4ddc8e7 (patch)
tree1c79b0b20ecf8560067fb5f9b9b668d707c3309c /ext/opcache/zend_persist.c
parent8308e617f112a6fac048020793cde4675d83b962 (diff)
downloadphp-git-4bc7ee2eb776b05c8794c2c3abb5f995d4ddc8e7.tar.gz
Fixed conditions
Diffstat (limited to 'ext/opcache/zend_persist.c')
-rw-r--r--ext/opcache/zend_persist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 43376ed2a9..2564f88476 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -801,7 +801,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
zend_shared_alloc_clear_xlat_table();
zend_accel_store(script, sizeof(zend_persistent_script));
- *key = zend_accel_memdup(*key, key_length + 1);
+ if (*key) {
+ *key = zend_accel_memdup(*key, key_length + 1);
+ }
zend_accel_store_string(script->full_path);
#ifdef __SSE2__