Commit 8897c362 authored by Fabien Potencier's avatar Fabien Potencier

merged branch docteurklein/autoloader_fix (PR #100)

Commits
-------

5144db26 Merge branch 'master' of github.com:docteurklein/Silex
0fd27b49 removed leading backslash; set autoload of class_exists to false
f3171054 [Autoloading] Made the require_once of the UnviversalClassLoader conditional.

Discussion
----------

Autoloader fix

[Autoloading] Made the require_once of the UnviversalClassLoader conditional.

As we can't know what happened before we require the silex.phar file, we
can't deduce if an autoloader has already been required.
It can lead to fatal errors for cases like it is in SilexBundle.

---------------------------------------------------------------------------

by brikou at 2011/06/27 09:38:43 -0700

👍
parents 7c7d51f7 5144db26
<?php
require_once __DIR__.'/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
if (false === class_exists('Symfony\Component\ClassLoader\UniversalClassLoader', false)) {
require_once __DIR__.'/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
}
use Symfony\Component\ClassLoader\UniversalClassLoader;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment