cvs: phpweb(NEW_LOOK_2008) /bin createNewsEntry
| From: | Hannes Magnusson | Date: | Fri, 26 Sep 2008 11:47:14 +0000 |
| Subject: | cvs: phpweb(NEW_LOOK_2008) /bin createNewsEntry | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2699@lists.php.net to get a copy of this message | ||
bjori Fri Sep 26 11:47:14 2008 UTC
Modified files: (Branch: NEW_LOOK_2008)
/phpweb/bin createNewsEntry
Log:
Make sure we are working with an array
http://cvs.php.net/viewvc.cgi/phpweb/bin/createNewsEntry?r1=1.4&r2=1.4.2.1&diff_format=u
Index: phpweb/bin/createNewsEntry
diff -u phpweb/bin/createNewsEntry:1.4 phpweb/bin/createNewsEntry:1.4.2.1
--- phpweb/bin/createNewsEntry:1.4 Wed Apr 30 21:44:08 2008
+++ phpweb/bin/createNewsEntry Fri Sep 26 11:47:14 2008
@@ -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 @@
} else {
$n = $d->createElement($name);
}
- foreach($attrs as $k => $v) {
+ foreach((array)$attrs as $k => $v) {
$n->setAttribute($k, $v);
}
if ($to) {