cvs: phd /include PhDHelper.class.php
| From: | Hannes Magnusson | Date: | Mon, 01 Oct 2007 21:58:00 +0000 |
| Subject: | cvs: phd /include PhDHelper.class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-121@lists.php.net to get a copy of this message | ||
bjori Mon Oct 1 21:58:00 2007 UTC
Modified files:
/phd/include PhDHelper.class.php
Log:
Fix possibly endless loop
http://cvs.php.net/viewvc.cgi/phd/include/PhDHelper.class.php?r1=1.6&r2=1.7&diff_format=u
Index: phd/include/PhDHelper.class.php
diff -u phd/include/PhDHelper.class.php:1.6 phd/include/PhDHelper.class.php:1.7
--- phd/include/PhDHelper.class.php:1.6 Mon Oct 1 17:43:23 2007
+++ phd/include/PhDHelper.class.php Mon Oct 1 21:58:00 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDHelper.class.php,v 1.6 2007/10/01 17:43:23 bjori Exp $ */
+/* $Id: PhDHelper.class.php,v 1.7 2007/10/01 21:58:00 bjori Exp $ */
class PhDHelper {
private $IDs = array();
@@ -38,6 +38,9 @@
$filename = dirname(__FILE__) ."/langs/$lang.xml";
$r = new XMLReader;
if (!$r->open($filename)) {
+ if ($lang == "en") {
+ throw new Exception("Cannot open $filename");
+ }
return $this->autogen($text, "en");
}
$autogen = array();