outputhtml works on PHP 5.4

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2820 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-06-29 12:50:19 +00:00
parent 09eda99eaf
commit aadfae008a

View File

@@ -100,11 +100,11 @@ EOT;
as $key=>$val)
{
$files = $dom->getElementsByTagName ($key);
for ($i = 0 ; $i < $files->length ; $i++)
foreach ($files as $id=>$file)
{
if ($files[$i]->hasAttribute ($val) === false)
if ($file->hasAttribute ($val) === false)
continue;
$src = $files[$i]->getAttribute ($val);
$src = $file->getAttribute ($val);
if ($src === "")
continue;
if (substr ($src, 0, 7) === "http://" ||
@@ -121,12 +121,10 @@ EOT;
$srcHash = filemtime ($srcFile);
else
$srcHash = time();
$dom->getElementsByTagName ($key)[$i]->setAttribute ($val,
"$src?$srcHash");
$file->setAttribute ($val, "$src?$srcHash");
}
}
echo $dom->saveHTML();exit;
echo $resView;
echo $dom->saveHTML();
if (!defined ("PHPUNIT"))
exit;
}