mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
using the domain cake_error for messages not intended for end users
This commit is contained in:
parent
2fc8d88916
commit
9b092f4bf2
2 changed files with 7 additions and 7 deletions
|
@ -74,7 +74,7 @@ class IniReader implements ConfigReaderInterface {
|
|||
if (!file_exists($filename)) {
|
||||
$filename .= '.ini';
|
||||
if (!file_exists($filename)) {
|
||||
throw new ConfigureException(__d('cake', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename));
|
||||
throw new ConfigureException(__d('cake_error', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename));
|
||||
}
|
||||
}
|
||||
$contents = parse_ini_file($filename, true);
|
||||
|
|
|
@ -55,7 +55,7 @@ class PhpReader implements ConfigReaderInterface {
|
|||
*/
|
||||
public function read($key) {
|
||||
if (strpos($key, '..') !== false) {
|
||||
throw new ConfigureException(__d('cake', 'Cannot load configuration files with ../ in them.'));
|
||||
throw new ConfigureException(__d('cake_error', 'Cannot load configuration files with ../ in them.'));
|
||||
}
|
||||
if (substr($key, -4) === '.php') {
|
||||
$key = substr($key, 0, -4);
|
||||
|
@ -70,13 +70,13 @@ class PhpReader implements ConfigReaderInterface {
|
|||
if (!file_exists($file)) {
|
||||
$file .= '.php';
|
||||
if (!file_exists($file)) {
|
||||
throw new ConfigureException(__d('cake', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
|
||||
throw new ConfigureException(__d('cake_error', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file));
|
||||
}
|
||||
}
|
||||
include $file;
|
||||
if (!isset($config)) {
|
||||
throw new ConfigureException(
|
||||
sprintf(__d('cake', 'No variable $config found in %s.php'), $file)
|
||||
sprintf(__d('cake_error', 'No variable $config found in %s.php'), $file)
|
||||
);
|
||||
}
|
||||
return $config;
|
||||
|
|
Loading…
Reference in a new issue