Support » Plugin: WP PageNavi Style » Compat with PHP 7. Can you fix it or is this plugin abandoned?

  • Hello. I wanted to let you know the style selector in the config screen is not loading the options as it used to be. It appears blank when WordPress runs on PHP 7.x. Can you fix that?

    In sites where the plugin have been properly configured on previous versions of WP, the frontend works great an as expected. But in sites where the plugin is just deployed, it is using the default configuration. So, the problem appears to be only on the backend.

    It works well with PHP 5.6.

    These are the logged errors under PHP 7:

    [28-Feb-2017 11:50:19 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function eregi() in /home/xxxxxxx/public_html/wp-content/plugins/wp-pagenavi-style/includes/options.php:70
    Stack trace:
    #0 /home/xxxxxxx/public_html/wp-content/plugins/wp-pagenavi-style/wp-pagenavi-style.php(95): include_once()
    #1 /home/xxxxxxx/public_html/wp-includes/class-wp-hook.php(298): wp_pn_style_options_page('')
    #2 /home/xxxxxxx/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #3 /home/xxxxxxx/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 /home/xxxxxxx/public_html/wp-admin/admin.php(222): do_action('toplevel_page_w...')
    #5 {main}
      thrown in /home/xxxxxxx/public_html/wp-content/plugins/wp-pagenavi-style/includes/options.php on line 70 

    Any idea to solve this?
    Thanks in advance!

Viewing 1 replies (of 1 total)
  • The problem is due to the use of eregi in includes/options.php, line 70. It simply must be updated to a compatible instruction.

    How to solve.

    Simply replace

    if (eregi("\.css",$file)) { /* Look for files with .png extension */

    with

    if (preg_match("/\.css/",$file)) { /* Look for files with .png extension */

    And that’s it.

    • This reply was modified 1 year, 5 months ago by  Marcelo Pedra.
Viewing 1 replies (of 1 total)
  • The topic ‘Compat with PHP 7. Can you fix it or is this plugin abandoned?’ is closed to new replies.