https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115153

Revision: 115153
Author:   yaron
Date:     2012-05-07 17:13:29 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Fix for r106195 - patch by Jeroen De Dauw

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php

Modified: trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php
===================================================================
--- trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php 
2012-05-07 14:22:45 UTC (rev 115152)
+++ trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php 
2012-05-07 17:13:29 UTC (rev 115153)
@@ -76,9 +76,11 @@
 
                if ( array_key_exists( 'query', $result ) && array_key_exists( 
'pages', $result['query'] ) ) {
                        foreach ( $result['query']['pages'] as $page ) {
-                               foreach ( $page['imageinfo'] as $imageInfo ) {
-                                       $url = $imageInfo['thumburl'];
-                                       break;
+                               if ( array_key_exists( 'imageinfo', $page ) ) {
+                                       foreach ( $page['imageinfo'] as 
$imageInfo ) {
+                                               $url = $imageInfo['thumburl'];
+                                               break;
+                                       }
                                }
                        }
                }
@@ -159,9 +161,9 @@
                // holds a single value, not a list of values.)
                $size = 35;
                $inputType = '';
-               if ( array_key_exists( 'field_type', $other_args )  &&
+               if ( array_key_exists( 'field_type', $other_args ) &&
                        ( !array_key_exists( 'is_list', $other_args ) ||
-                       !$other_args['is_list'] ) ) {
+                       !$other_args['is_list'] ) ) {
                        if ( $other_args['field_type'] == 'number' ) {
                                $size = 10;
                                $inputType = 'number';


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to