r65587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65586‎ | r65587 | r65588 >
Date:21:52, 27 April 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added additional check for 'display_options' field, to prevent warning message in some versions of PHP
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
@@ -111,7 +111,7 @@
112112 // handling is different for SMW 1.5+
113113 if ( method_exists( 'SMWQueryResult', 'getResults' ) ) {
114114 $res_subject = $field->getResultSubject();
115 - if ( is_array( $res_subject->display_options ) && array_key_exists( 'color', $res_subject->display_options ) )
 115+ if ( isset( $res_subject->display_options ) && is_array( $res_subject->display_options ) && array_key_exists( 'color', $res_subject->display_options ) )
116116 $color = $res_subject->display_options['color'];
117117 } elseif ( property_exists( $row[0], 'display_options' ) ) {
118118 if ( is_array( $row[0]->display_options ) && array_key_exists( 'color', $row[0]->display_options ) )

Status & tagging log