# HG changeset patch # User Nicholas Jillings # Date 1484831343 0 # Node ID 82b6b75a91bc85118b8a68ec7a9b21db7469b808 # Parent 68299f11d4453d96acbc561e7ecb56c898c272df Same as last diff -r 68299f11d445 -r 82b6b75a91bc php/save.php --- 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) {