Skip to content

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

@dbrzoska

Description

@dbrzoska

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

  • Environment name and version (e.g. PHP 7.2 on nginx 1.9.1):
  • Operating System and version: ubuntu 23.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions