Fixes #1750 added proper block cloning to put the image size part after the #number and fixing Process call to array instead of string

This commit is contained in:
Aurélien Vandoorine 2019-11-28 09:24:06 +01:00
parent b8346af548
commit d9ea617545
2 changed files with 2 additions and 2 deletions

View File

@ -1085,7 +1085,7 @@ class TemplateProcessor
{
$results = array();
for ($i = 1; $i <= $count; $i++) {
$results[] = preg_replace('/\$\{(.*?)\}/', '\${\\1#' . $i . '}', $xmlBlock);
$results[] = preg_replace('/\$\{(.*?)(:.*)?\}/', '\${\1#' . $i . '\2}', $xmlBlock);
}
return $results;

View File

@ -26,7 +26,7 @@ abstract class AbstractWebServerEmbeddedTest extends \PHPUnit\Framework\TestCase
public static function setUpBeforeClass()
{
if (self::isBuiltinServerSupported()) {
self::$httpServer = new Process('php -S localhost:8080 -t tests/PhpWord/_files');
self::$httpServer = new Process(array('php', '-S', 'localhost:8080', '-t', 'tests/PhpWord/_files'));
self::$httpServer->start();
while (!self::$httpServer->isRunning()) {
usleep(1000);