From 96ae2ff22473704ce8625977fa74aad4771aec1f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 3 May 2017 10:30:23 -0400 Subject: [PATCH] Add doc about magic constants __FILE__ and __DIR__ --- doc/Developer-How-To-Move-Classes-to-src.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/Developer-How-To-Move-Classes-to-src.md b/doc/Developer-How-To-Move-Classes-to-src.md index ec86f0202..25eb39372 100644 --- a/doc/Developer-How-To-Move-Classes-to-src.md +++ b/doc/Developer-How-To-Move-Classes-to-src.md @@ -99,6 +99,9 @@ Howevever, this tool isn't bullet-proof, and a staging install of Friendica is r Most of Friendica processes are run in the background, so make sure to turn on your debug log to check for errors that wouldn't show up while simply browsing Friendica. +Check the class file for any magic constant `__FILE__` or `__DIR__`, as their value changed since you moved the class in the file tree. +Most of the time it's used for debugging purposes but there can be instances where it's used to create cache folders for example. + ## Related * [Class autoloading](help/autoloader)