From 55a3d5f8b1a6daf655a62700ce1a448387de1abc Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Tue, 15 May 2007 13:04:43 +0000 Subject: [PATCH] MFH: Fixed bug #41390 (Clarify error message with invalid protocol scheme) --- NEWS | 2 ++ main/streams/userspace.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index bb146cc7f3..e6d5b3f0fe 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS - Fixed altering $this via argument named "this". (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) - Fixed segfault in strripos(). (Tony, Joxean Koret) +- Fixed bug #41390 (Clarify error message with invalid protocol scheme). + (Scott) - Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in "Status:" header). (anight at eyelinkmedia dot com, Dmitry) - Fixed bug #41374 (wholetext concats values of wrong nodes). (Rob) diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 235147b7ff..e403debdcf 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -458,8 +458,8 @@ PHP_FUNCTION(stream_wrapper_register) 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 { - /* Should never happen */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to register wrapper class %s to %s://", classname, protocol); + /* Hash doesn't exist so it must have been an invalid protocol scheme */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid protocol scheme specified. Unable to register wrapper class %s to %s://", classname, protocol); } } } else { -- 2.40.0