• Error on api-php

    PHP ERROR:array(4) {
      ["type"]=>
      int(4)
      ["message"]=>
      string(64) "syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ']'"
      ["file"]=>
      string(99) ".../wp-content/plugins/lingotek-translation/include/api.php" 
      ["line"]=> 
      int(578)
    }

    To solve it: replace -> with =>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does this mean I shold change line 578 in api.php from
    $this->log_error_on_response_failure($response, “DeleteTranslation: Error occurred”, [‘id’ -> $id, ‘wordpress_id’ => $wp_id]);
    to
    $this=>log_error_on_response_failure($response, “DeleteTranslation: Error occurred”, [‘id’ => $id, ‘wordpress_id’ => $wp_id]);

    It didn’t work for me.

    I have same problem. Any suggestion how to fix it?

    • This reply was modified 5 years, 4 months ago by RGhost.

    The corrected line is this one:

    $this->log_error_on_response_failure($response, “DeleteTranslation: Error occurred”, [‘id’ => $id, ‘wordpress_id’ => $wp_id]);

    It will probably be fixed in the next release (NB: I am NOT a contributor).

    Yes, this works!
    Thanks!
    I have been in contact with Lingotek’s support but they didn’t know so they passed it by to their technician. Now I don’t need to wait 🙂

    • This reply was modified 5 years, 4 months ago by joppedi.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP ERROR on api.php’ is closed to new replies.