diff us/index.php @ 28:b058736bc9ad

fix old :-( preg bug
author Robert Boland <robert@markup.co.uk>
date Fri, 04 Jan 2019 08:48:00 -0500
parents d606320ec331
children dbc006408d2b
line wrap: on
line diff
--- a/us/index.php	Fri Jan 04 08:45:42 2019 -0500
+++ b/us/index.php	Fri Jan 04 08:48:00 2019 -0500
@@ -143,7 +143,7 @@
 					$bookDetails = getAmazonDet($isbn,1,'us'); 
 					$bookXML = new SimpleXMLElement($bookDetails);
 					// HST added this
-					if (preg_match("<Error>",$bookDetails)) {
+					if (preg_match("/<Error>/",$bookDetails)) {
 					  $resName=$bookXML->getName();
 					  $code=$bookXML->Error->Code;
 					  file_put_contents('/var/ywww/debug/phpDebug',"Losing 3: $resName, ".
@@ -218,7 +218,7 @@
 				      $bookLDetails = getAmazonDet($linkedISBN,1,'us'); 
 				      $bookLXML = new SimpleXMLElement($bookLDetails);
 				      // HST added this
-				      if (preg_match("<Error>",$bookLDetails)) {
+				      if (preg_match("/<Error>/",$bookLDetails)) {
 					$resName=$bookLXML->getName();
 					$code=$bookLXML->Error->Code;
 					file_put_contents('/var/ywww/debug/phpDebug',"Losing 2: $resName, ".