projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security update for Core, with self-updated composer
[yaffs-website]
/
vendor
/
symfony
/
routing
/
Loader
/
AnnotationFileLoader.php
diff --git
a/vendor/symfony/routing/Loader/AnnotationFileLoader.php
b/vendor/symfony/routing/Loader/AnnotationFileLoader.php
index d98e024640366f0ea3da0a78cb19eeeb39d23f2e..22edc867137656483ea9dcb67c08a6cd0be0cf3e 100644
(file)
--- a/
vendor/symfony/routing/Loader/AnnotationFileLoader.php
+++ b/
vendor/symfony/routing/Loader/AnnotationFileLoader.php
@@
-92,6
+92,11
@@
class AnnotationFileLoader extends FileLoader
$class = false;
$namespace = false;
$tokens = token_get_all(file_get_contents($file));
$class = false;
$namespace = false;
$tokens = token_get_all(file_get_contents($file));
+
+ if (1 === count($tokens) && T_INLINE_HTML === $tokens[0][0]) {
+ throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "<?php" start tag at the beginning of the file?', $file));
+ }
+
for ($i = 0; isset($tokens[$i]); ++$i) {
$token = $tokens[$i];
for ($i = 0; isset($tokens[$i]); ++$i) {
$token = $tokens[$i];