contao/core — pull request #5163 by Discordier (2012-12-17 15:40:17+00:00)
Title: fix issue #5152 - Autoload creator does not handle some files correctly.

Autoload creator does not handle files correctly that have the "class" or "interface" declaration within the last 512 bytes chunk of file.

When the
```
class Foo
{
}
```
is within the last 512 bytes of the file and those 512 bytes do not also appear to be the first 512 bytes, the autoload creator skips the preg_match() call due to early resolving of the "&&" conditions in the while loop.

Therefore I inverted the conditions to always perform the preg_match first, as this hurts less on an empty string than having no match at all. :)