• Resolved bdking71

    (@bdking71)


    I am seeing the following error with the plugin using PHP version 7.2.19 and WordPress version 5.2.2.

    Use of undefined constant token – assumed ‘token’ (this will throw an Error in a future version of PHP) in <snip>/wp-content/plugins/poptin/poptin.php on line 209

    I looked into the code and found this line was causing the error:

    $curl_post_array = array(
    token => $token,
    user_id => $user_id
    );

    I changed the line to:

    $curl_post_array = array(
    ‘token’ => $token,
    ‘user_id’ => $user_id
    );

    Adding the single quotes around “token” and “user_id” cleared the error.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Undefined constant token Error’ is closed to new replies.