XAR files: syntax error, unexpected end of file
thekid opened this issue · 6 comments
thekid commented
$ XP_RT=7.4 xp -cp test.xar xp.unittest.Runner src/test/config/unittest/core.ini
Uncaught exception: ParseError (syntax error, unexpected end of file)
at <source> [line 277 of xar://.\test.xar?xp/unittest/Runner.class.php]
at <main>('src/test/config/unittest/core.ini') [line 0 of xp.unittest.Runner]
at lang.AbstractClassLoader->loadClass0('xp.unittest.Runner') [line 444 of lang.base.php]
at <main>::{closure}('xp\\unittest\\Runner') [line 0 of (unknown)]
at <main>::spl_autoload_call('xp\\unittest\\Runner') [line 0 of (unknown)]
at <main>::is_callable(array[2]) [line 369 of class-main.php]
With PHP 7.3, no error occurs.
thekid commented
Wow, this fixes the problem:
-$r= include($this->classUri($class));
+$r= eval("?>".file_get_contents($this->classUri($class)));
Hrm, maybe some of the stream wrapper code might have been changed?
thekid commented
thekid commented
This might be the indicator of what's going wrong:
$ ls -al Runner.php
-rw----r-- 1 Timm Timm 8192 Jul 28 12:50 Runner.php
# ^^^^
Opened bug report in PHP project -> https://bugs.php.net/bug.php?id=78340
thekid commented
Might be related to php/php-src@d59aac5
thekid commented
thekid commented
Bug fixed, all PHP versions are green once again