Author Topic: Call to undefined function League\OAuth2\Client\Provider\random_byte() : SOLVED  (Read 155 times)


  • Newbie
  • *
  • Posts: 7
    • View Profile

I was doing an integration recently for a client's application to aweber using OAuth2 and I ran into the error stated below

Code: [Select]
Fatal error: Call to undefined function League\OAuth2\Client\Provider\random_bytes() in /path/to/admin/aweber/vendor/league/oauth2-client/src/Provider/AbstractProvider.php on line 305
It took a while to figure this out, but it was simply fixed by upgrading PHP version from 5.6 to PHP7.2

I hope this helps save someone's time :)