File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 23
23
}
24
24
],
25
25
"require" : {
26
- "php" : " >=5.3.9 " ,
26
+ "php" : " >=5.4.6 " ,
27
27
"mouf/mouf-installer" : " ~2.0.1" ,
28
28
"mouf/mouf-validators-interface" : " ~2.0" ,
29
29
"container-interop/container-interop" : " ~1.0" ,
Original file line number Diff line number Diff line change @@ -207,6 +207,9 @@ public function toJson() {
207
207
// In some cases, the call to getDefaultValue can log NOTICES
208
208
// in particular if an undefined constant is used as default value.
209
209
ob_start ();
210
+ if ($ this ->isDefaultValueConstant () && !defined ($ this ->getDefaultValueConstantName ())) {
211
+ throw new \Exception ('Constant " ' .$ this ->getDefaultValueConstantName ().'" does not exist. ' );
212
+ }
210
213
$ result ['default ' ] = $ this ->getDefaultValue ();
211
214
$ possibleError = ob_get_clean ();
212
215
if ($ possibleError ) {
You can’t perform that action at this time.
0 commit comments