Author: gjh-mediazilla
Description:
Version page output: MediaWiki: 1.5alpha2 PHP: 5.0.3 (apache) MySQL: 4.0.18-Max
PHP error seen:
Invalid argument supplied for foreach() in mediawiki/includes/GlobalFunctions.php on line 1099
Answer found on: http://wordpress.org/support/topic/24530.
(Array case inserted, error disappears.)
Checked CVS, array cast missing from latest sources. Here's a diff if required.
diff -uNr phase3/includes/GlobalFunctions.php wiki/includes/GlobalFunctions.php
- phase3/includes/GlobalFunctions.php 2005-06-01 07:17:42.000000000 +0100
+++ wiki/includes/GlobalFunctions.php 2005-06-05 14:40:20.000000000 +0100
@@ -1096,7 +1096,7 @@
*/
function wfElement( $element, $attribs = array(), $contents = '') {
$out = '<' . $element;
- foreach( $attribs as $name => $val ) {
+ foreach( (array)$attribs as $name => $val ) {
$out .= ' ' . $name . '="' . htmlspecialchars( $val ) . '"'; } if( is_null( $contents ) ) {
HTH.
Version: 1.5.x
Severity: normal
OS: Linux
Platform: Other
URL: http://www.higginsandmacfarlane.net