diff php/save.php @ 2638:82b6b75a91bc

Same as last
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 19 Jan 2017 13:09:03 +0000
parents 68299f11d445
children 2d9955974316
line wrap: on
line diff
--- a/php/save.php	Thu Jan 19 13:07:43 2017 +0000
+++ b/php/save.php	Thu Jan 19 13:09:03 2017 +0000
@@ -4,7 +4,9 @@
     if (empty($attributeName) || empty($attributeValue)) {
         die("Error: Empty findNodeByAttribute");
     }
-    
+    if (empty($nodeList)) {
+        return 0;
+    }
     foreach($nodeList as $item) {
         if ($item->hasAttribute($attributeName)) {
             if ($item->getAttribute($attributeValue) == $attributeValue) {