I am currently using the following code in CakePHP 1.3.10 (using PHP 5.2.17) when mkdir returns false:
CakeLog::write('error', "An error occurred while creating the \"$target_dir\" directory.");
I would like to also capture the exact error message such as:
Warning (2): mkdir() [function.mkdir]: File exists
I could then include that error message in the log. How can I do that with CakePHP? I've tried using the error_get_last
function, but it just says:
Non-static method Configure::getInstance() should not be called statically, assuming $this from incompatible context
Any help would be appreciated.