http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60805
Revision: 60805 Author: yaron Date: 2010-01-07 20:14:02 +0000 (Thu, 07 Jan 2010) Log Message: ----------- Fixed PHP errors Modified Paths: -------------- trunk/extensions/SemanticForms/includes/SF_FormInputs.inc Modified: trunk/extensions/SemanticForms/includes/SF_FormInputs.inc =================================================================== --- trunk/extensions/SemanticForms/includes/SF_FormInputs.inc 2010-01-07 19:49:38 UTC (rev 60804) +++ trunk/extensions/SemanticForms/includes/SF_FormInputs.inc 2010-01-07 20:14:02 UTC (rev 60805) @@ -160,7 +160,7 @@ $text .= " <option value=\"$possible_value\""; if ($possible_value == $cur_value) {$text .= " selected=\"selected\""; } $text .= ">"; - if ( isset($other_args['value_labels']) && isset($other_args['value_labels'][$possible_value]) ) + if (array_key_exists('value_labels', $other_args) && array_key_exists($possible_value, $other_args['value_labels'])) $text .= htmlspecialchars($other_args['value_labels'][$possible_value]); else $text .= $possible_value; @@ -220,7 +220,7 @@ $text .= " <option value=\"$possible_value\""; if (in_array($possible_value, $cur_values)) {$text .= " selected"; } $text .= ">"; - if ( $other_args['value_labels'] && $other_args['value_labels'][$possible_value] ) + if (array_key_exists('value_labels', $other_args) && array_key_exists($possible_value, $other_args['value_labels'])) $text .= htmlspecialchars($other_args['value_labels'][$possible_value]); else $text .= $possible_value; @@ -264,7 +264,7 @@ foreach ($possible_values as $key => $possible_value) { $cur_input_name = $input_name . "[" . $key . "]"; $checked_text = (in_array($possible_value, $cur_values)) ? 'checked="checked"' : ""; - if ( $other_args['value_labels'] && $other_args['value_labels'][$possible_value] ) + if (array_key_exists('value_labels', $other_args) && array_key_exists($possible_value, $other_args['value_labels'])) $label = htmlspecialchars($other_args['value_labels'][$possible_value]); else $label = $possible_value; @@ -613,7 +613,7 @@ $text .= ' checked="checked"'; $check_set = true; } - if ( $other_args['value_labels'] && $other_args['value_labels'][$possible_value] ) + if (array_key_exists('value_labels', $other_args) && array_key_exists($possible_value, $other_args['value_labels'])) $label = htmlspecialchars($other_args['value_labels'][$possible_value]); else $label = $possible_value; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs