Page MenuHomePhabricator

PHP Notices in data['view_urls'] items in skins/Vector.php
Closed, ResolvedPublic

Description

-rakkaus/#mediawiki-i18n- (1 lines skipped) [27-Feb-2011 15:30:45] PHP Notice: Undefined index: text in /www/w/skins/Vector.php on line 367

Seen on TW


Version: 1.18.x
Severity: minor

Details

Reference
bz27764

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:27 PM
bzimport set Reference to bz27764.
bzimport added a subscriber: Unknown Object (MLST).

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/Vector.php?view=markup#l360

<li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ?  '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : htmlspecialchars( $link['text'] ) ) ?></a></span></li>

$link['text']

[22:02:30] -rakkaus:#mediawiki-i18n- (1 lines skipped) [20-Mar-2011 20:01:42] PHP Notice: Undefined index: text in /www/w/skins/Vector.php on line 369

Seems to have moved a line or 2 ;)

PHP Notice: Undefined index: href in /www/w/skins/Vector.php on line 369

Should we track where this data comes from?

Yes, I believe it comes from an extension that passes invalid links to Vector.

btw, that's not entirely the same notice as the one this bug was about, so I've widen the summary.

Not sure how much this would break, but perhaps there should be a requirement for which items it needs and otherwise some central (instead of inline) defaults otherwise.

The last issue here seems to be a dupe of 38334. Marking this as resolved fixed (as the primary issue was dealt with).