mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
using the domain cake_error for error messages.
These are error message for developers
This commit is contained in:
parent
b90939f659
commit
2fc8d88916
3 changed files with 25 additions and 25 deletions
|
@ -143,7 +143,7 @@ class Cache {
|
|||
}
|
||||
$cacheClass = $class . 'Engine';
|
||||
if (!is_subclass_of($cacheClass, 'CacheEngine')) {
|
||||
throw new CacheException(__d('cake', 'Cache engines must use CacheEngine as a base class.'));
|
||||
throw new CacheException(__d('cake_error', 'Cache engines must use CacheEngine as a base class.'));
|
||||
}
|
||||
self::$_engines[$name] = new $cacheClass();
|
||||
if (self::$_engines[$name]->init($config)) {
|
||||
|
@ -283,7 +283,7 @@ class Cache {
|
|||
self::set(null, $config);
|
||||
if ($success === false && $value !== '') {
|
||||
trigger_error(
|
||||
__d('cake', "%s cache was unable to write '%s' to cache", $config, $key),
|
||||
__d('cake_error', "%s cache was unable to write '%s' to cache", $config, $key),
|
||||
E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ class FileEngine extends CacheEngine {
|
|||
* @throws CacheException
|
||||
*/
|
||||
public function decrement($key, $offset = 1) {
|
||||
throw new CacheException(__d('cake', 'Files cannot be atomically decremented.'));
|
||||
throw new CacheException(__d('cake_error', 'Files cannot be atomically decremented.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -261,7 +261,7 @@ class FileEngine extends CacheEngine {
|
|||
* @throws CacheException
|
||||
*/
|
||||
public function increment($key, $offset = 1) {
|
||||
throw new CacheException(__d('cake', 'Files cannot be atomically incremented.'));
|
||||
throw new CacheException(__d('cake_error', 'Files cannot be atomically incremented.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -297,7 +297,7 @@ class FileEngine extends CacheEngine {
|
|||
$dir = new SplFileInfo($this->settings['path']);
|
||||
if ($this->_init && !($dir->isDir() && $dir->isWritable())) {
|
||||
$this->_init = false;
|
||||
trigger_error(__d('cake', '%s is not writable', $this->settings['path']), E_USER_WARNING);
|
||||
trigger_error(__d('cake_error', '%s is not writable', $this->settings['path']), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -153,7 +153,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
public function increment($key, $offset = 1) {
|
||||
if ($this->settings['compress']) {
|
||||
throw new CacheException(
|
||||
__d('cake', 'Method increment() not implemented for compressed cache in %s', __CLASS__)
|
||||
__d('cake_error', 'Method increment() not implemented for compressed cache in %s', __CLASS__)
|
||||
);
|
||||
}
|
||||
return $this->_Memcache->increment($key, $offset);
|
||||
|
@ -171,7 +171,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
public function decrement($key, $offset = 1) {
|
||||
if ($this->settings['compress']) {
|
||||
throw new CacheException(
|
||||
__d('cake', 'Method decrement() not implemented for compressed cache in %s', __CLASS__)
|
||||
__d('cake_error', 'Method decrement() not implemented for compressed cache in %s', __CLASS__)
|
||||
);
|
||||
}
|
||||
return $this->_Memcache->decrement($key, $offset);
|
||||
|
|
Loading…
Reference in a new issue