Skip to content

Commit 55a3d5f

Browse files
author
Scott MacVicar
committed
MFH: Fixed bug #41390 (Clarify error message with invalid protocol scheme)
1 parent e5a5567 commit 55a3d5f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ PHP NEWS
1010
- Fixed altering $this via argument named "this". (Dmitry)
1111
- Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
1212
- Fixed segfault in strripos(). (Tony, Joxean Koret)
13+
- Fixed bug #41390 (Clarify error message with invalid protocol scheme).
14+
(Scott)
1315
- Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in
1416
"Status:" header). (anight at eyelinkmedia dot com, Dmitry)
1517
- Fixed bug #41374 (wholetext concats values of wrong nodes). (Rob)

main/streams/userspace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ PHP_FUNCTION(stream_wrapper_register)
458458
if (zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), protocol, protocol_len + 1)) {
459459
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol %s:// is already defined.", protocol);
460460
} else {
461-
/* Should never happen */
462-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to register wrapper class %s to %s://", classname, protocol);
461+
/* Hash doesn't exist so it must have been an invalid protocol scheme */
462+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid protocol scheme specified. Unable to register wrapper class %s to %s://", classname, protocol);
463463
}
464464
}
465465
} else {

0 commit comments

Comments
 (0)