Skip to content

Commit 988e43b

Browse files
gsmaulFrantisek Drojak
authored andcommitted
Test patch for php#13 - session_regenerate_id() causes fatal error
1 parent 33facf6 commit 988e43b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

php7/memcache_session.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ static int php_mmc_session_read_request(
262262
*/
263263
PS_READ_FUNC(memcache)
264264
{
265+
*val = ZSTR_EMPTY_ALLOC();
265266
mmc_pool_t *pool = PS_GET_MOD_DATA();
266267

267268
if (pool != NULL) {
@@ -298,7 +299,7 @@ PS_READ_FUNC(memcache)
298299

299300
/* create requests */
300301
if (php_mmc_session_read_request(pool, &zkey, lockparam, &addresult, dataparam, &lockrequest, &addrequest, &datarequest) != MMC_OK) {
301-
break;
302+
return FAILURE;
302303
}
303304

304305
/* find next server in line */
@@ -360,9 +361,13 @@ PS_READ_FUNC(memcache)
360361

361362
mmc_queue_free(&skip_servers);
362363
zval_dtor(&dataresult);
363-
}
364364

365+
return SUCCESS;
366+
}
367+
else
368+
{
365369
return FAILURE;
370+
}
366371
}
367372
/* }}} */
368373

@@ -548,3 +553,4 @@ PS_GC_FUNC(memcache)
548553
* vim600: noet sw=4 ts=4 fdm=marker
549554
* vim<600: noet sw=4 ts=4
550555
*/
556+

0 commit comments

Comments
 (0)