Skip to content

Commit

Permalink
Fixed token loop when XML is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Peardian committed Jun 14, 2016
1 parent 59c6470 commit e0a92c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions includes/classes/AmazonCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,10 +734,7 @@ protected function sleep(){
* @return boolean <b>FALSE</b> if no XML data
*/
protected function checkToken($xml){
if (!$xml){
return false;
}
if ($xml->NextToken && (string)$xml->HasNext != 'false' && (string)$xml->MoreResultsAvailable != 'false'){
if ($xml && $xml->NextToken && (string)$xml->HasNext != 'false' && (string)$xml->MoreResultsAvailable != 'false'){
$this->tokenFlag = true;
$this->options['NextToken'] = (string)$xml->NextToken;
} else {
Expand Down

0 comments on commit e0a92c0

Please sign in to comment.