Skip to content

Instantly share code, notes, and snippets.

@eriksimonic
Created May 8, 2015 09:19
Show Gist options
  • Save eriksimonic/8570990f27133c426f48 to your computer and use it in GitHub Desktop.
Save eriksimonic/8570990f27133c426f48 to your computer and use it in GitHub Desktop.
Debug Magento Autoload problems with backtrace
Temporary edit the lib/Varien/Autoload.php
public function autoload($class)
{
if ($this->_collectClasses) {
$this->_arrLoadedClasses[self::$_scope][] = $class;
}
if ($this->_isIncludePathDefined) {
$classFile = COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . $class;
} else {
$classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
}
$classFile.= '.php';
if($classFile == "File.php")
{
Mage::log(Varien_Debug::backtrace(true,true),null,"bcktrace.log",true);
}
return include $classFile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment