dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e482413
)
Put the suppress & restore warnings calls *around* parse_url() rather than around...
author
Brion Vibber
<brion@users.mediawiki.org>
Wed, 30 Jan 2008 23:44:26 +0000
(23:44 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Wed, 30 Jan 2008 23:44:26 +0000
(23:44 +0000)
This avoids PHP warning notices when given not-quite-valid input, such as "http://en.wikipedia.org{{localurl:Talk:Wet_Tropics_of_Queensland/Comments|action=edit}}"
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
7237d74
..
3b19ae4
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-1946,8
+1946,8
@@
function wfRelativePath( $path, $from ) {
*/
function wfMakeUrlIndex( $url ) {
global $wgUrlProtocols; // Allow all protocols defined in DefaultSettings/LocalSettings.php
- $bits = parse_url( $url );
wfSuppressWarnings();
+ $bits = parse_url( $url );
wfRestoreWarnings();
if ( !$bits ) {
return false;