Fix notice; use isset() to test if things are set
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Aug 2004 09:54:28 +0000 (09:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Aug 2004 09:54:28 +0000 (09:54 +0000)
includes/QueryPage.php

index 92a9911..99c2a3f 100644 (file)
@@ -152,7 +152,7 @@ class QueryPage {
                # Only read at most $num rows, because $res may contain the whole 1000
                for ( $i = 0; $i < $num && $obj = $dbr->fetchObject( $res ); $i++ ) {
                        $format = $this->formatResult( $sk, $obj );
-                       $attr = ( !is_null ( $obj->usepatrol ) && $obj->usepatrol &&
+                       $attr = ( isset ( $obj->usepatrol ) && $obj->usepatrol &&
                                  $obj->patrolled == 0 ) ? ' class="not_patrolled"' : '';
                        $s .= "<li{$attr}>{$format}</li>\n";
                }