Skip to content
Browse files

Fixed check for the device UID's length when not using the UDID

If the 'official' UDID is not being used as the device's unique identifier (meaning a string generated by CFUUIDCreate is being used) the length of the UID is not 40 characters.
  • Loading branch information...
1 parent 76688c8 commit 603b2bee899259b7bc2f775722f84bb36920b428 @gonecoding committed Nov 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/php/classes/class_APNS.php
View
2 src/php/classes/class_APNS.php
@@ -266,7 +266,7 @@ private function _registerDevice($appname, $appversion, $deviceuid, $devicetoken
if(strlen($appname)==0) $this->_triggerError('Application Name must not be blank.', E_USER_ERROR);
else if(strlen($appversion)==0) $this->_triggerError('Application Version must not be blank.', E_USER_ERROR);
- else if(strlen($deviceuid)!=40) $this->_triggerError('Device ID must be 40 characters in length.', E_USER_ERROR);
+ else if(strlen($deviceuid)>40) $this->_triggerError('Device ID may not be more than 40 characters in length.', E_USER_ERROR);
else if(strlen($devicetoken)!=64) $this->_triggerError('Device Token must be 64 characters in length.', E_USER_ERROR);
else if(strlen($devicename)==0) $this->_triggerError('Device Name must not be blank.', E_USER_ERROR);
else if(strlen($devicemodel)==0) $this->_triggerError('Device Model must not be blank.', E_USER_ERROR);

0 comments on commit 603b2be

Please sign in to comment.
Something went wrong with that request. Please try again.