From ba2182a44cac3713d5c3196244d8ec986e07135c Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 31 Mar 2009 16:25:58 +0000 Subject: [PATCH] Fix errormessage check # Is correct in 5. --- main/streams/userspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 67010ea861d..99cf7d4bda3 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -515,7 +515,7 @@ PHP_FUNCTION(stream_wrapper_register) RETURN_TRUE; } else { /* We failed. But why? */ - if (zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, protocol_len)) { + if (zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, protocol_len+1)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol %s:// is already defined", protocol); } else { /* Hash doesn't exist so it must have been an invalid protocol scheme */