opentok / OpenTok-PHP-SDK

OpenTok PHP Server SDK
https://tokbox.com/developer/sdks/php/
MIT License
140 stars 145 forks source link

E_ERROR: Cannot redeclare OpenTok\Util\array_is_list() (previously declared in/opentok/opentok/src/OpenTok/Util/Validators.php:465 #345

Open dbrzoska opened 10 months ago

dbrzoska commented 10 months ago

When I call generateToken method more than one time in code execution have this error. I think function_exists does not work property fine. If you use function declaration in other function you need to add namespace.

if i change in src/OpenTok/Util/Validators.php (464 line) if (!function_exists('array_is_list')) { to if (!function_exists('\OpenTok\Util\array_is_list')) { its works fine.

Your Environment

travhow99 commented 8 months ago

We are having the same issue with version 4.14, and have had to revert to 4.10 as a workaround at the moment.