Support » Plugin: OpenBook Book Data » fails with WordPress 4.9.7

  • Resolved Goulu

    (@goulu)


    Got this after upgrading : Fatal error: Uncaught Error: Call to undefined function ereg() in /home/clients/35666af5317ba4b26577e5dc7df1a2a0/web/wp-content/plugins/openbook-book-data/libraries/openbook_utilities.php:106

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

    (@goulu)

    Well, in fact it’s not directly a problem with the plugin, it’s related to PHP : the ereg function is now deprecated so another function called preg_match must be used instead.

    SO I just changed line 106 of the openbook_utilities.php file as such :

    //test if 10 or 13 digits ISBN
    function openbook_utilities_validISBN($testisbn) {
    return (preg_match (“/([0-9]{10})/”, $testisbn, $regs) || preg_match (“/([0-9]{13})/”, $testisbn, $regs));
    }

    and it works again ! 🙂

    I’m getting a different set of error messages since upgrading:

    Warning: count(): Parameter must be an array or an object that implements Countable in /home/edweiss/webapps/updatedpinkwater/wp-content/plugins/openbook-book-data/libraries/openbook_openlibrary.php on line 101

    Warning: Use of undefined constant “ – assumed ‘“’ (this will throw an Error in a future version of PHP) in /home/edweiss/webapps/updatedpinkwater/wp-content/plugins/openbook-book-data/libraries/openbook_utilities.php on line 107

    Warning: A non-numeric value encountered in /home/edweiss/webapps/updatedpinkwater/wp-content/plugins/openbook-book-data/libraries/openbook_utilities.php on line 107

    Warning: Division by zero in /home/edweiss/webapps/updatedpinkwater/wp-content/plugins/openbook-book-data/libraries/openbook_utilities.php on line 107

    Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/edweiss/webapps/updatedpinkwater/wp-content/plugins/openbook-book-data/libraries/openbook_utilities.php on line 107

    Any idea what these are about?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘fails with WordPress 4.9.7’ is closed to new replies.