Mercurial > hg > ywww
comparison php/read/getBookDetails.php @ 28:b058736bc9ad
fix old :-( preg bug
author | Robert Boland <robert@markup.co.uk> |
---|---|
date | Fri, 04 Jan 2019 08:48:00 -0500 |
parents | 828895488948 |
children | 5cae8d572998 |
comparison
equal
deleted
inserted
replaced
27:1bb0bc3d306a | 28:b058736bc9ad |
---|---|
228 file_put_contents('/var/ywww/debug/phpDebug', | 228 file_put_contents('/var/ywww/debug/phpDebug', |
229 "W/o lock for $requestIP 2b\n",FILE_APPEND); | 229 "W/o lock for $requestIP 2b\n",FILE_APPEND); |
230 } | 230 } |
231 //echo $out; | 231 //echo $out; |
232 $mm=array(); | 232 $mm=array(); |
233 if (preg_match("<Error>",$out,$mm)) { | 233 if (preg_match("/<Error>/",$out,$mm)) { |
234 $xml = new SimpleXMLElement($out); | 234 $xml = new SimpleXMLElement($out); |
235 $resName=$xml->getName(); | 235 $resName=$xml->getName(); |
236 $code=$xml->Error->Code; | 236 $code=$xml->Error->Code; |
237 if (!$code) { | 237 if (!$code) { |
238 $code=$xml->Items->Request->Errors->Error->Code; | 238 $code=$xml->Items->Request->Errors->Error->Code; |