mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing cache hits, as App::core() is almost always called before Cache is initialized, as Cache uses App::core to load the first configured engine. This Cache::read call can never succeed so it should be removed.
This commit is contained in:
parent
fdcfd03340
commit
2d21e9c331
1 changed files with 0 additions and 5 deletions
|
@ -324,9 +324,6 @@ class App {
|
||||||
*/
|
*/
|
||||||
public static function core($type = null) {
|
public static function core($type = null) {
|
||||||
static $paths = false;
|
static $paths = false;
|
||||||
if ($paths === false) {
|
|
||||||
$paths = Cache::read('core_paths', '_cake_core_');
|
|
||||||
}
|
|
||||||
if (!$paths) {
|
if (!$paths) {
|
||||||
$paths = array();
|
$paths = array();
|
||||||
$libs = dirname(__FILE__) . DS;
|
$libs = dirname(__FILE__) . DS;
|
||||||
|
@ -347,8 +344,6 @@ class App {
|
||||||
$paths['shells'][] = $cake . 'console' . DS . 'shells' . DS;
|
$paths['shells'][] = $cake . 'console' . DS . 'shells' . DS;
|
||||||
// Provide BC path to vendors/shells
|
// Provide BC path to vendors/shells
|
||||||
$paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS;
|
$paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS;
|
||||||
|
|
||||||
Cache::write('core_paths', array_filter($paths), '_cake_core_');
|
|
||||||
}
|
}
|
||||||
if ($type && isset($paths[$type])) {
|
if ($type && isset($paths[$type])) {
|
||||||
return $paths[$type];
|
return $paths[$type];
|
||||||
|
|
Loading…
Reference in a new issue