Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | * Print query results in tables. |
6 | 6 | * |
7 | 7 | * @author Markus Krötzsch |
8 | | - * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 8 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
9 | 9 | * |
10 | 10 | * @file |
11 | 11 | * @ingroup SMWQuery |
— | — | @@ -117,7 +117,13 @@ |
118 | 118 | $cells = array(); |
119 | 119 | |
120 | 120 | foreach ( $subject as $i => $field ) { |
121 | | - $columnClass = $columnClasses[$i]; |
| 121 | + // $columnClasses will be empty if "headers=hide" |
| 122 | + // was set. |
| 123 | + if ( array_key_exists( $i, $columnClasses ) ) { |
| 124 | + $columnClass = $columnClasses[$i]; |
| 125 | + } else { |
| 126 | + $columnClass = null; |
| 127 | + } |
122 | 128 | $cells[] = $this->getCellForPropVals( $field, $outputmode, $columnClass ); |
123 | 129 | } |
124 | 130 | |