better test for image
authoralan <alan@member2016.hhyc.local>
Mon, 6 Jun 2016 09:00:55 +0000 (17:00 +0800)
committeralan <alan@member2016.hhyc.local>
Mon, 6 Jun 2016 09:00:55 +0000 (17:00 +0800)
Images.php

index 438db09..5cf0d71 100644 (file)
@@ -272,7 +272,7 @@ class Pman_Core_Images extends Pman
     }
     function validateSize()
     {
-        if (($this->authUser && $this->authUser->company_id && $this->authUser->company()->comptype=='OWNER') || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
+        if (($this->authUser && !empty($this->authUser->company_id) && $this->authUser->company()->comptype=='OWNER') || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
             return true;
         }