简体   繁体   中英

Is it a known bug that PHP-Redis in PHP 5.6 crashes if setting a key value to NULL?

This PHP code crashes the host (Apache) with a segfault:

$myRedis->hSet("some key name", NULL);

This is troubling to me, because PHP is supposed to be a high-level language that doesn't dereference NULL pointers, but instead either accepts them as "empty value" or throws an exception.

Am I the only one seeing this? (This code worked fine in PHP 5.3 and 5.5)

Try this:

$myRedis->hSet("some key name", null, null);

Further, Check This

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM