proper handling of infinite expiry
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 16 Feb 2004 00:05:25 +0000 (00:05 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 16 Feb 2004 00:05:25 +0000 (00:05 +0000)
includes/Block.php

index 13cb657..891598d 100644 (file)
@@ -179,7 +179,11 @@ class Block
 
        function isExpired() 
        {       
-               return wfTimestampNow() > $this->mExpiry;
+               if ( !$this->mExpiry ) {
+                       return false;
+               } else {
+                       return wfTimestampNow() > $this->mExpiry;
+               }
        }
 
        function isValid()