Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -806,9 +806,9 @@ |
807 | 807 | } |
808 | 808 | # Check basic, already available, promotion heuristics first... |
809 | 809 | $now = time(); |
810 | | - $usercreation = wfTimestamp( TS_UNIX, $user->getRegistration() ); |
811 | | - $userage = floor(($now - $usercreation) / 86400); |
812 | | - if( $userage < $wgFlaggedRevsAutopromote['days'] ) { |
| 810 | + $usercreation = wfTimestampOrNull( TS_UNIX, $user->getRegistration() ); |
| 811 | + $userage = $usercreation ? floor(($now - $usercreation) / 86400) : NULL; |
| 812 | + if( !is_null($userage) && $userage < $wgFlaggedRevsAutopromote['days'] ) { |
813 | 813 | wfProfileOut( __METHOD__ ); |
814 | 814 | return true; |
815 | 815 | } |