check for empty, not just zero
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 30 Mar 2010 13:52:00 +0000 (09:52 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 30 Mar 2010 13:52:00 +0000 (09:52 -0400)
framework/ActiveSync/lib/Horde/ActiveSync/Request/Base.php

index 74f7fb1..2165ddb 100644 (file)
@@ -119,7 +119,7 @@ abstract class Horde_ActiveSync_Request_Base
             $state = $this->_driver->getStateObject();
             $storedKey = $state->getPolicyKey($this->_devId);
             /* Loose provsioning should allow a blank key */
-            if (($storedKey == 0 || $storedKey != $sentKey) &&
+            if ((empty($storedKey) || $storedKey != $sentKey) &&
                ($this->_provisioning !== 'loose' ||
                ($this->_provisioning === 'loose' && !empty($this->_policyKey)))) {
 
@@ -145,4 +145,4 @@ abstract class Horde_ActiveSync_Request_Base
         $this->_devId = $devId;
     }
 
-}
\ No newline at end of file
+}