<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -106,19 +106,18 @@ class plistParser extends XMLReader
 			$this-&gt;nextOfType(XMLReader::ELEMENT);
 			$array[$key] = $this-&gt;parse_node();
 			$this-&gt;nextOfType(XMLReader::ELEMENT, XMLReader::END_ELEMENT);
-		} while(!$this-&gt;isNodeOfTypeName(XMLReader::END_ELEMENT, &quot;dict&quot;));
+		} while($this-&gt;nodeType &amp;&amp; !$this-&gt;isNodeOfTypeName(XMLReader::END_ELEMENT, &quot;dict&quot;));
 		return $array;
 	}
 	
 	private function parse_array() {
 		$array = array();
+        $this-&gt;nextOfType(XMLReader::ELEMENT);
 		do {
-			// find the first item of the array and append it onto the node list
-			$this-&gt;nextOfType(XMLReader::ELEMENT);
 			$array[] = $this-&gt;parse_node();
 			// skip over any whitespace
 			$this-&gt;nextOfType(XMLReader::ELEMENT, XMLReader::END_ELEMENT);
-		} while(!$this-&gt;isNodeOfTypeName(XMLReader::END_ELEMENT, &quot;array&quot;));
+		} while($this-&gt;nodeType &amp;&amp; !$this-&gt;isNodeOfTypeName(XMLReader::END_ELEMENT, &quot;array&quot;));
 		return $array;
 	}
 	
@@ -134,7 +133,7 @@ class plistParser extends XMLReader
 		// skip to next
 		$this-&gt;read();
 		// check if it's one of the types requested and loop until it's one we want
-		while(!(in_array($this-&gt;nodeType, $types))) {
+		while($this-&gt;nodeType &amp;&amp; !(in_array($this-&gt;nodeType, $types))) {
 			// node isn't of type requested, so keep going
 			$this-&gt;read();
 		}</diff>
      <filename>classes/parsers/plist/PlistParser.inc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f01a65a8eecb34cb84be4c0a6064e4bb4216958c</id>
    </parent>
  </parents>
  <author>
    <name>Jonty</name>
    <email>jonty@jonty.co.uk</email>
  </author>
  <url>http://github.com/jsjohnst/php_class_lib/commit/0371782ca8aef1152baddca57808c98e84a91ecc</url>
  <id>0371782ca8aef1152baddca57808c98e84a91ecc</id>
  <committed-date>2009-09-05T16:45:57-07:00</committed-date>
  <authored-date>2009-09-05T11:24:54-07:00</authored-date>
  <message>Fixes various infinite loops on heavily nested plists, fixes a logic bug
in nested array/dict handling that lead to incorrect nesting.

Signed-off-by: Jeremy Johnstone &lt;github@jeremyjohnstone.com&gt;</message>
  <tree>6c046394c0fa6d6e1fde68244589158054d0d2e6</tree>
  <committer>
    <name>Jeremy Johnstone</name>
    <email>github@jeremyjohnstone.com</email>
  </committer>
</commit>
