1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Make sure we are working with an array

This commit is contained in:
Hannes Magnusson
2008-09-26 11:47:14 +00:00
parent 9cd77624c4
commit 61cc651e65

View File

@@ -1,4 +1,4 @@
#!/usr/local/bin/php
#!/usr/share/php
<?php
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");
$BASE = "http://www.php.net";
@@ -9,7 +9,7 @@ function ce(DOMDocument $d, $name, $value, array $attrs = array(), DOMNode $to =
} else {
$n = $d->createElement($name);
}
foreach($attrs as $k => $v) {
foreach((array)$attrs as $k => $v) {
$n->setAttribute($k, $v);
}
if ($to) {