Fix errormessage check

# Is correct in 5.
This commit is contained in:
Hannes Magnusson 2009-03-31 16:25:58 +00:00
parent b57c3201e0
commit ba2182a44c

View File

@ -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 */