You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-php/twig/files/1.40.1-autoloader-path.patch

17 lines
852 B

--- a/lib/Twig/Autoloader.php 2019-04-29 16:12:28.000000000 +0200
+++ b/lib/Twig/Autoloader.php.new 2019-05-06 21:37:39.955238245 +0200
@@ -43,9 +43,11 @@
return;
}
- if (is_file($file = __DIR__.'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) {
+ if (is_file($file = __DIR__.'/../'.str_replace(['Twig_', "\0"], ['lib/', ''], $class).'.php')) {
require $file;
- } elseif (is_file($file = __DIR__.'/../../src/'.str_replace(['Twig\\', '\\', "\0"], ['', '/', ''], $class).'.php')) {
+ } elseif (is_file($file = __DIR__.'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) {
+ require $file;
+ } elseif (is_file($file = __DIR__.'/../src/'.str_replace(['Twig\\', '\\', "\0"], ['', '/', ''], $class).'.php')) {
require $file;
}
}