Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349734 )

Change subject: Fixed "Cannot use object of type stdClass as array"
......................................................................

Fixed "Cannot use object of type stdClass as array"

Refs: https://www.mediawiki.org/wiki/Topic:Tb8vb8jyvckkl37m

Change-Id: Id2f0a57674389394ff233679387dd86a0de616cb
Thanks: https://www.mediawiki.org/w/index.php?title=User:Rrosenfeld
---
M LastUserLogin.body.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LastUserLogin 
refs/changes/34/349734/1

diff --git a/LastUserLogin.body.php b/LastUserLogin.body.php
index 441dfff..a134715 100644
--- a/LastUserLogin.body.php
+++ b/LastUserLogin.body.php
@@ -14,7 +14,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
- * 
+ *
  * @file
  */
 
@@ -103,16 +103,16 @@
                        $out .= '<tr>';
                        foreach ( $fields as $key => $value ) {
                                if ( $key === 'user_touched' ) {
-                                       $lastLogin = $wgLang->timeanddate( 
wfTimestamp( TS_MW, $row[ $key ] ), true );
-                                       $daysAgo = $wgLang->formatNum( round( ( 
time() - wfTimestamp( TS_UNIX, $row[ $key ] ) ) / 3600 / 24, 2 ), 2 );
+                                       $lastLogin = $wgLang->timeanddate( 
wfTimestamp( TS_MW, $row->$key ), true );
+                                       $daysAgo = $wgLang->formatNum( round( ( 
time() - wfTimestamp( TS_UNIX, $row->$key ) ) / 3600 / 24, 2 ), 2 );
                                        $out .= '<td>' . $lastLogin . '</td>';
-                                       $out .= '<td 
style="text-align:right;">' . $daysAgo . '</td>';
+                                       $out .= '<td style="text-align: 
right;">' . $daysAgo . '</td>';
                                } elseif ( $key === 'user_name' ) {
-                                       $userPage = Title::makeTitle( NS_USER, 
$row[ $key ] );
+                                       $userPage = Title::makeTitle( NS_USER, 
$row->$key );
                                        $userName = Linker::link( $userPage, 
htmlspecialchars( $userPage->getText() ) );
                                        $out .= '<td>' . $userName . '</td>';
                                } else {
-                                       $out .= '<td>' . htmlspecialchars( 
$row[ $key ] ) . '</td>';
+                                       $out .= '<td>' . htmlspecialchars( 
$row->$key ) . '</td>';
                                }
                        }
                        $out .= '</tr>';

-- 
To view, visit https://gerrit.wikimedia.org/r/349734
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2f0a57674389394ff233679387dd86a0de616cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LastUserLogin
Gerrit-Branch: REL1_27
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

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

Reply via email to