@@ -432,7 +432,7 @@ static zend_always_inline zend_string *accel_find_interned_string(zend_string *s
432
432
433
433
if (!ZCG (counted )) {
434
434
if (!ZCG (accelerator_enabled ) || accel_activate_add () == FAILURE ) {
435
- return str ;
435
+ return NULL ;
436
436
}
437
437
ZCG (counted ) = 1 ;
438
438
}
@@ -754,10 +754,9 @@ static void accel_use_shm_interned_strings(void)
754
754
if (ZCSG (interned_strings ).saved_top == NULL ) {
755
755
accel_copy_permanent_strings (accel_new_interned_string );
756
756
} else {
757
+ ZCG (counted ) = 1 ;
757
758
accel_copy_permanent_strings (accel_replace_string_by_shm_permanent );
758
- if (ZCG (counted )) {
759
- accel_deactivate_sub ();
760
- }
759
+ ZCG (counted ) = 0 ;
761
760
}
762
761
accel_interned_strings_save_state ();
763
762
@@ -1187,7 +1186,11 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l
1187
1186
cwd_len = ZCG (cwd_key_len ) = buf + sizeof (buf ) - 1 - res ;
1188
1187
cwd = ZCG (cwd_key );
1189
1188
memcpy (ZCG (cwd_key ), res , cwd_len + 1 );
1189
+ } else {
1190
+ return NULL ;
1190
1191
}
1192
+ } else {
1193
+ return NULL ;
1191
1194
}
1192
1195
}
1193
1196
}
@@ -1226,7 +1229,11 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l
1226
1229
include_path_len = ZCG (include_path_key_len ) = buf + sizeof (buf ) - 1 - res ;
1227
1230
include_path = ZCG (include_path_key );
1228
1231
memcpy (ZCG (include_path_key ), res , include_path_len + 1 );
1232
+ } else {
1233
+ return NULL ;
1229
1234
}
1235
+ } else {
1236
+ return NULL ;
1230
1237
}
1231
1238
}
1232
1239
}
@@ -2325,6 +2332,7 @@ static void accel_reset_pcre_cache(void)
2325
2332
static void accel_activate (void )
2326
2333
{
2327
2334
if (!ZCG (enabled ) || !accel_startup_ok ) {
2335
+ ZCG (accelerator_enabled ) = 0 ;
2328
2336
return ;
2329
2337
}
2330
2338
@@ -2352,6 +2360,7 @@ static void accel_activate(void)
2352
2360
2353
2361
#ifdef HAVE_OPCACHE_FILE_CACHE
2354
2362
if (file_cache_only ) {
2363
+ ZCG (accelerator_enabled ) = 0 ;
2355
2364
return ;
2356
2365
}
2357
2366
#endif
0 commit comments