diff --git a/lib/Cake/Cache/Engine/MemcacheEngine.php b/lib/Cake/Cache/Engine/MemcacheEngine.php index 76b3b4c36..98b91d63b 100644 --- a/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -165,7 +165,7 @@ class MemcacheEngine extends CacheEngine { public function increment($key, $offset = 1) { if ($this->settings['compress']) { throw new CacheException( - __d('cake_dev', 'Method increment() not implemented for compressed cache in %s', __CLASS__) + __d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'increment()', __CLASS__) ); } return $this->_Memcache->increment($key, $offset); @@ -182,7 +182,7 @@ class MemcacheEngine extends CacheEngine { public function decrement($key, $offset = 1) { if ($this->settings['compress']) { throw new CacheException( - __d('cake_dev', 'Method decrement() not implemented for compressed cache in %s', __CLASS__) + __d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'decrement()', __CLASS__) ); } return $this->_Memcache->decrement($key, $offset); diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php index dbb8975a1..6d0f3b8b4 100644 --- a/lib/Cake/Controller/Component/AclComponent.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -159,7 +159,7 @@ class AclComponent extends Component { * @deprecated Will be removed in 3.0. */ public function grant($aro, $aco, $action = "*") { - trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING); + trigger_error(__d('cake_dev', '%s is deprecated, use %s instead', 'AclComponent::grant()', 'allow()'), E_USER_WARNING); return $this->_Instance->allow($aro, $aco, $action); } @@ -173,7 +173,7 @@ class AclComponent extends Component { * @deprecated Will be removed in 3.0. */ public function revoke($aro, $aco, $action = "*") { - trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING); + trigger_error(__d('cake_dev', '%s is deprecated, use %s instead', 'AclComponent::revoke()', 'deny()'), E_USER_WARNING); return $this->_Instance->deny($aro, $aco, $action); } diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index b198ee8c7..6ef2dcc89 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -495,7 +495,7 @@ class AuthComponent extends Component { throw new CakeException(__d('cake_dev', 'Authorization adapter "%s" was not found.', $class)); } if (!method_exists($className, 'authorize')) { - throw new CakeException(__d('cake_dev', 'Authorization objects must implement an authorize method.')); + throw new CakeException(__d('cake_dev', 'Authorization objects must implement an %s method.', 'authorize')); } $settings = array_merge($global, (array)$settings); $this->_authorizeObjects[] = new $className($this->_Collection, $settings); @@ -784,7 +784,7 @@ class AuthComponent extends Component { throw new CakeException(__d('cake_dev', 'Authentication adapter "%s" was not found.', $class)); } if (!method_exists($className, 'authenticate')) { - throw new CakeException(__d('cake_dev', 'Authentication objects must implement an authenticate method.')); + throw new CakeException(__d('cake_dev', 'Authentication objects must implement an %s method.', 'authenticate')); } $settings = array_merge($global, (array)$settings); $this->_authenticateObjects[] = new $className($this->_Collection, $settings); diff --git a/lib/Cake/Log/LogEngineCollection.php b/lib/Cake/Log/LogEngineCollection.php index 2304246a0..5de70d02c 100644 --- a/lib/Cake/Log/LogEngineCollection.php +++ b/lib/Cake/Log/LogEngineCollection.php @@ -42,9 +42,9 @@ class LogEngineCollection extends ObjectCollection { $className = $this->_getLogger($loggerName); $logger = new $className($options); if (!$logger instanceof CakeLogInterface) { - throw new CakeLogException(sprintf( - __d('cake_dev', 'logger class %s does not implement a write method.'), $loggerName - )); + throw new CakeLogException( + __d('cake_dev', 'logger class %s does not implement a %s method.', $loggerName, 'write()') + ); } $this->_loaded[$name] = $logger; if ($enable) { diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 68c5fa144..675cfd58f 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -486,10 +486,10 @@ class CakeSession { if (!empty($sessionConfig['ini']) && is_array($sessionConfig['ini'])) { foreach ($sessionConfig['ini'] as $setting => $value) { if (ini_set($setting, $value) === false) { - throw new CakeSessionException(sprintf( - __d('cake_dev', 'Unable to configure the session, setting %s failed.'), - $setting - )); + throw new CakeSessionException( + __d('cake_dev', 'Unable to configure the session, setting %s failed.', + $setting) + ); } } } diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 9a22fffc3..0186d5553 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -906,7 +906,7 @@ class CakeEmail { if (!class_exists($transportClassname)) { throw new SocketException(__d('cake_dev', 'Class "%s" not found.', $transportClassname)); } elseif (!method_exists($transportClassname, 'send')) { - throw new SocketException(__d('cake_dev', 'The "%s" do not have send method.', $transportClassname)); + throw new SocketException(__d('cake_dev', 'The "%s" does not have a %s method.', $transportClassname, 'send()')); } return $this->_transportClass = new $transportClassname(); diff --git a/lib/Cake/Network/Http/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php index 0b5276a7c..9d50fd027 100644 --- a/lib/Cake/Network/Http/HttpSocket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -604,7 +604,7 @@ class HttpSocket extends CakeSocket { throw new SocketException(__d('cake_dev', 'Unknown authentication method.')); } if (!method_exists($authClass, 'authentication')) { - throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support authentication.'), $authClass)); + throw new SocketException(__d('cake_dev', 'The %s do not support authentication.', $authClass)); } call_user_func_array("$authClass::authentication", array($this, &$this->_auth[$method])); } @@ -633,7 +633,7 @@ class HttpSocket extends CakeSocket { throw new SocketException(__d('cake_dev', 'Unknown authentication method for proxy.')); } if (!method_exists($authClass, 'proxyAuthentication')) { - throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support proxy authentication.'), $authClass)); + throw new SocketException(__d('cake_dev', 'The %s do not support proxy authentication.', $authClass)); } call_user_func_array("$authClass::proxyAuthentication", array($this, &$this->_proxy)); } diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index db602e712..5df50f923 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -184,7 +184,7 @@ class Security { */ public static function cipher($text, $key) { if (empty($key)) { - trigger_error(__d('cake_dev', 'You cannot use an empty key for Security::cipher()'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'You cannot use an empty key for %s', 'Security::cipher()'), E_USER_WARNING); return ''; } @@ -217,7 +217,7 @@ class Security { */ public static function rijndael($text, $key, $operation) { if (empty($key)) { - trigger_error(__d('cake_dev', 'You cannot use an empty key for Security::rijndael()'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'You cannot use an empty key for %s', 'Security::rijndael()'), E_USER_WARNING); return ''; } if (empty($operation) || !in_array($operation, array('encrypt', 'decrypt'))) { diff --git a/lib/Cake/View/Helper/PaginatorHelper.php b/lib/Cake/View/Helper/PaginatorHelper.php index 46c7d7806..e1069e61d 100644 --- a/lib/Cake/View/Helper/PaginatorHelper.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -95,9 +95,9 @@ class PaginatorHelper extends AppHelper { App::uses($ajaxProvider . 'Helper', 'View/Helper'); $classname = $ajaxProvider . 'Helper'; if (!class_exists($classname) || !method_exists($classname, 'link')) { - throw new CakeException(sprintf( - __d('cake_dev', '%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname - )); + throw new CakeException( + __d('cake_dev', '%s does not implement a link() method, it is incompatible with PaginatorHelper', $classname) + ); } parent::__construct($View, $settings); }