8000 define constant only if it wasn't defined before · symfony/symfony@388229b · GitHub
[go: up one dir, main page]

Skip to content

Commit 388229b

Browse files
committed
define constant only if it wasn't defined before
1 parent efbf588 commit 388229b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Symfony/Component/ClassLoader/ClassMapGenerator.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212
namespace Symfony\Component\ClassLoader;
1313

14-
if (PHP_VERSION_ID >= 50400) {
15-
define('SYMFONY_TRAIT', T_TRAIT);
16-
} else {
17-
define('SYMFONY_TRAIT', 0);
14+
if (!defined('SYMFONY_TRAIT')) {
15+
if (PHP_VERSION_ID >= 50400) {
16+
define('SYMFONY_TRAIT', T_TRAIT);
17+
} else {
18+
define('SYMFONY_TRAIT', 0);
19+
}
1820
}
1921

2022
/**

0 commit comments

Comments
 (0)
0