Remove un-needed cast for array key in WatchedItemStore
authoraddshore <addshorewiki@gmail.com>
Thu, 24 Mar 2016 10:38:41 +0000 (10:38 +0000)
committeraddshore <addshorewiki@gmail.com>
Thu, 24 Mar 2016 10:38:41 +0000 (10:38 +0000)
'1' for example will always result in a php array
key of int 1.
Same for all strings that look like / can correctly
be cast to ints

Change-Id: Id52e4273c6b2f342a148181ce63300aac37582d9

includes/WatchedItemStore.php

index 20ec592..9e21f14 100644 (file)
@@ -583,7 +583,7 @@ class WatchedItemStore {
                $this->reuseConnection( $dbr );
 
                foreach ( $res as $row ) {
-                       $timestamps[(int)$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp;
+                       $timestamps[$row->wl_namespace][$row->wl_title] = $row->wl_notificationtimestamp;
                }
 
                return $timestamps;