Skip to content

Commit

Permalink
Merge pull request #223 from s3ri0usman/master
Browse files Browse the repository at this point in the history
Fixed returning user id for not 64 bit php systems
  • Loading branch information
raiym authored Nov 23, 2017
2 parents b84a101 + 4da8efe commit e7b08cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/InstagramScraper/Model/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ public function getUsername()
*/
public function getId()
{
return (int)$this->id;
if (PHP_INT_SIZE > 4) {
$this->id = (int)$this->id;
}

return $this->id;
}

/**
Expand Down Expand Up @@ -184,7 +188,7 @@ protected function initPropertiesCustom($value, $prop, $array)
{
switch ($prop) {
case 'id':
$this->id = (int)$value;
$this->id = $value;
break;
case 'username':
$this->username = $value;
Expand Down

0 comments on commit e7b08cf

Please sign in to comment.