简体   繁体   English

如果将键值设置为NULL,这是PHP 5.6中的PHP-Redis崩溃的已知错误吗?

[英]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: 此PHP代码使用segfault使主机(Apache)崩溃:

$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. 这对我来说很麻烦,因为PHP应该是一种高级语言,它不会取消引用NULL指针,而是将其作为“空值”接受或引发异常。

Am I the only one seeing this? 我是唯一一个看到这个的人吗? (This code worked fine in PHP 5.3 and 5.5) (此代码在PHP 5.3和5.5中运行良好)

Try this: 尝试这个:

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

Further, Check This 此外, 请检查此

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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