|
|
@@ -317,17 +317,13 @@ class Debugger
|
|
|
*/
|
|
|
public static function trimPath($path)
|
|
|
{
|
|
|
- if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) {
|
|
|
- return $path;
|
|
|
- }
|
|
|
-
|
|
|
- if (strpos($path, APP) === 0) {
|
|
|
+ if (defined('APP') && strpos($path, APP) === 0) {
|
|
|
return str_replace(APP, 'APP/', $path);
|
|
|
}
|
|
|
- if (strpos($path, CAKE_CORE_INCLUDE_PATH) === 0) {
|
|
|
+ if (defined('CAKE_CORE_INCLUDE_PATH') && strpos($path, CAKE_CORE_INCLUDE_PATH) === 0) {
|
|
|
return str_replace(CAKE_CORE_INCLUDE_PATH, 'CORE', $path);
|
|
|
}
|
|
|
- if (strpos($path, ROOT) === 0) {
|
|
|
+ if (defined('ROOT') && strpos($path, ROOT) === 0) {
|
|
|
return str_replace(ROOT, 'ROOT', $path);
|
|
|
}
|
|
|
|