File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 11--TEST--
22Check for Yaf_View_Simple error message outputing
33--SKIPIF--
4- <?php if (!extension_loaded ("yaf " )) print "skip " ; ?>
4+ <?php
5+ if (!extension_loaded ("yaf " )) die ("skip " );
6+ if (version_compare (PHP_VERSION , "8.4 " , "ge " )) print "skip only for <= 8.3 " ;
7+ ?>
58--INI--
69yaf.library="/php/global/dir"
710log_errors=0
@@ -34,4 +37,4 @@ require "build.inc";
3437shutdown ();
3538?>
3639--EXPECTF--
37- Parse error: syntax error, unexpected %s}%c in %sfoo.phtml on line %d
40+ Parse error: syntax error, unexpected %s}%c in %sfoo.phtml on line %d
Original file line number Diff line number Diff line change 11--TEST--
22Check for Yaf_View_Simple recursive render error message outputing
33--SKIPIF--
4- <?php if (!extension_loaded ("yaf " )) print "skip " ; ?>
4+ <?php
5+ if (!extension_loaded ("yaf " )) die ("skip " );
6+ ?>
57--INI--
68yaf.library="/php/global/dir"
79log_errors=0
3537try {
3638 echo $ view ->render ($ tpl , array ('tpl ' => $ tpl2 ));
3739} catch (Error $ e ) {
38- echo $ e ->getMessage ();
40+ $ msg = $ e ->getMessage ();
41+ if (version_compare (PHP_VERSION , "8.4 " , "ge " )) {
42+ if (strcmp ("syntax error, unexpected token \"{ \"" , $ msg ) == 0 ) {
43+ echo "okey " ;
44+ } else {
45+ echo $ msg ;
46+ }
47+ } else {
48+ if (strcmp ("syntax error, unexpected token \"} \"" , $ msg ) == 0 ) {
49+ echo "okey " ;
50+ } else {
51+ echo $ msg ;
52+ }
53+ }
3954}
4055?>
4156--CLEAN--
4459require "build.inc " ;
4560shutdown ();
4661?>
47- --EXPECTF --
48- syntax error, unexpected %s}%c
62+ --EXPECT --
63+ okey
You can’t perform that action at this time.
0 commit comments