Return-Path: Delivered-To: apmail-incubator-chemistry-commits-archive@minotaur.apache.org Received: (qmail 49638 invoked from network); 22 Jan 2011 16:40:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jan 2011 16:40:51 -0000 Received: (qmail 38142 invoked by uid 500); 22 Jan 2011 16:40:50 -0000 Delivered-To: apmail-incubator-chemistry-commits-archive@incubator.apache.org Received: (qmail 38090 invoked by uid 500); 22 Jan 2011 16:40:50 -0000 Mailing-List: contact chemistry-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-commits@incubator.apache.org Received: (qmail 38080 invoked by uid 99); 22 Jan 2011 16:40:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jan 2011 16:40:49 +0000 X-ASF-Spam-Status: No, hits=-1998.0 required=10.0 tests=ALL_TRUSTED,FB_GET_MEDS X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jan 2011 16:40:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5FC2C23889E3; Sat, 22 Jan 2011 16:40:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1062189 - /incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php Date: Sat, 22 Jan 2011 16:40:26 -0000 To: chemistry-commits@incubator.apache.org From: richardm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110122164026.5FC2C23889E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: richardm Date: Sat Jan 22 16:40:26 2011 New Revision: 1062189 URL: http://svn.apache.org/viewvc?rev=1062189&view=rev Log: CMIS-290 extractObjectFromNode() returns object with null-keyed properties array Added additional checks after further testing while working on drupal cmis module Modified: incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php Modified: incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php URL: http://svn.apache.org/viewvc/incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php?rev=1062189&r1=1062188&r2=1062189&view=diff ============================================================================== --- incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php (original) +++ incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php Sat Jan 22 16:40:26 2011 @@ -383,7 +383,7 @@ class CMISRepositoryWrapper if ($pn->attributes) { $propDefId = $pn->attributes->getNamedItem("propertyDefinitionId"); - if (!is_null($propDefId)) + if (!is_null($propDefId) && $pn->getElementsByTagName("value") && $pn->getElementsByTagName("value")->item(0)) { $retval->properties[$propDefId->nodeValue] = $pn->getElementsByTagName("value")->item(0)->nodeValue; } @@ -399,7 +399,7 @@ class CMISRepositoryWrapper if (is_object($children_feed_c)) { $children_feed_l = $children_feed_c->getElementsByTagName("feed"); } - if (is_object($children_feed_l) && is_object($children_feed_l->item(0))) { + if (isset($children_feed_l) && is_object($children_feed_l) && is_object($children_feed_l->item(0))) { $children_feed = $children_feed_l->item(0); $children_doc = new DOMDocument(); $xnode = $children_doc->importNode($children_feed,true); // Avoid Wrong Document Error