From 8c39c3a2f96525ce049c37ac00f24716e3de7341 Mon Sep 17 00:00:00 2001 From: Shiki Date: Mon, 7 Jul 2014 09:15:13 +0800 Subject: [PATCH] Fixing incorrect references to CException. --- lib/YAPNS.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/YAPNS.php b/lib/YAPNS.php index 2b6e073..33fbf3a 100644 --- a/lib/YAPNS.php +++ b/lib/YAPNS.php @@ -55,7 +55,7 @@ class YAPNS extends \CApplicationComponent /** * - * @var ApnsPHP_Push + * @var \ApnsPHP_Push */ protected $_pushProvider; @@ -66,9 +66,9 @@ class YAPNS extends \CApplicationComponent public function init() { if (empty($this->providerCertificateFilePath)) - throw new CException('Push SSL certificate is required.'); + throw new \CException('Push SSL certificate is required.'); if (!in_array($this->environment, array(self::ENV_PRODUCTION, self::ENV_SANDBOX))) - throw new CException('Environment is invalid.'); + throw new \CException('Environment is invalid.'); $this->initAutoloader(); @@ -86,7 +86,7 @@ public function getPushProvider() return $this->_pushProvider; $push = new \ApnsPHP_Push( - $this->environment == self::ENV_PRODUCTION ? \ApnsPHP_Push::ENVIRONMENT_PRODUCTION : \ApnsPHP_Push::ENVIRONMENT_SANDBOX, + ($this->environment == self::ENV_PRODUCTION) ? \ApnsPHP_Push::ENVIRONMENT_PRODUCTION : \ApnsPHP_Push::ENVIRONMENT_SANDBOX, $this->providerCertificateFilePath ); if ($this->rootCertificationAuthorityFilePath)