https://bugzilla.wikimedia.org/show_bug.cgi?id=45069
Web browser: ---
Bug ID: 45069
Summary: PHP Notice: Undefined index: path in wfParseUrl
function in mailto:?subject= URLs
Product: MediaWiki
Version: 1.21-git
Hardware: All
URL: https://www.mediawiki.org/wiki/Thread:Project:Support_
desk/GLobafunctions.php_wfParseUrl_choking_on_url
OS: All
Status: UNCONFIRMED
Keywords: easy
Severity: trivial
Priority: Unprioritized
Component: Parser
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
According to the forum thread linked from this bug, when inserting a mailto:
url without email address but with a query string it gives a PHP notice.
For example:
mailto:?subject=Visit%20this%20website!&body=asdad
This URL syntax makes the mail program to create a new message without TO:
address but with the subject and body defined, useful to give users an easy way
to generate an email template for sharing.
This is the solution proposed on the forum thread: "Testing for isset(
$bits['path'] ) at GlobalFunctions.php line 755 corrects the error."
/* parse_url loses the third / for file:///c:/ urls (but not on variants) */
if ( isset( $bits['path'] ) ) { /* new */
if ( substr( $bits['path'], 0, 1 ) !== '/' ) {
$bits['path'] = '/' . $bits['path'];
}
} else { /* new */
$bits['path'] = '';
}
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l