• Hi
    I recently installed your plugin, and now am getting the following error
    Uninitialized string offset: 0 in /www/wp-content/plugins/query-monitor/collectors/environment.php on line 256

    It happens if you click within the dashboard on the upper line to open the daschboard of Query Monitor

    Can you have a look at this please
    It seems that a value is checked, that is not present
    Thanks for your help,
    Peter

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the report. It sounds like your server is returning a malformed value for one of the PHP extensions that are installed.

    Can you open the Environment panel in QM, and expand the Extensions value in the PHP section and then copy and paste its value please? Or send a screenshot of it.

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    Thanks for the quick response to my problem
    I am running on PHP version: 7.2.16
    Included a screenshot of the requested information
    Thanks !
    Peter
    Melding Uninitialized string offset: 0 1

    shutdown_action_hook()
    wp-content/plugins/query-monitor/collectors/environment.php:256
    do_action(‘shutdown’)
    wp-includes/load.php:788
    array_map()
    wp-content/plugins/query-monitor/collectors/environment.php:184
    wp-content/plugins/query-monitor/collectors/environment.php:256

    Plugin: query-monitor
    Waarschuwing (onderdrukt) Illegal offset type 1

    do_action(‘admin_init’)
    wp-admin/admin.php:169
    WPDB_Admin->wp_db_backup_admin_init()
    wp-includes/class-wp-hook.php:286
    add_settings_section()
    wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php:294
    wp-admin/includes/template.php:1499

    Plugin: wp-database-backup
    Verouders (onderdrukt) Non-static method WP_Feed_Cache::create() should not be called statically 1

    wp_dashboard()
    wp-admin/index.php:148
    do_meta_boxes()
    wp-admin/includes/dashboard.php:232
    SiteOrigin_Panels_Admin_Dashboard->dashboard_overview_widget()
    wp-admin/includes/template.php:1306
    wp_dashboard_primary_output()
    wp-content/plugins/siteorigin-panels/inc/admin-dashboard.php:67
    wp_widget_rss_output()
    wp-admin/includes/dashboard.php:1416
    fetch_feed()
    wp-includes/widgets.php:1439
    SimplePie->init()
    wp-includes/feed.php:716
    SimplePie_Registry->call()
    wp-includes/class-simplepie.php:1313
    wp-includes/SimplePie/Registry.php:215

    Plugin: siteorigin-panels

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    It looks like that screenshot disappeared Peter. You’ll need to upload it somewhere and link to it, the www.remarpro.com support forums don’t support attachments AFAIK.

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    My apologies, I could not add the screenshot as you indicated
    In stead i just copied the text from the screen into the post
    If you still need the screenshot, I need to see that I get it to you.
    Thanks
    Peter

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Cheers Peter, can you open the Environment panel in QM, and expand the Extensions value in the PHP section and then copy and paste its value please?

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    I am currently on holiday for one week, I will try to arrange that for you asap
    Peter

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    I hope this is what you asked me to provide

    Melding Uninitialized string offset: 0 1

    shutdown_action_hook()
    wp-content/plugins/query-monitor/collectors/environment.php:256
    do_action(‘shutdown’)
    wp-includes/load.php:947
    array_map()
    wp-content/plugins/query-monitor/collectors/environment.php:184
    wp-content/plugins/query-monitor/collectors/environment.php:256

    Plugin: query-monitor
    If not please give me more precise steps to produce the info
    Peter

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Does Query Monitor not show you a list of PHP extensions and their versions?

    Example:

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    No it does not show this.
    I can see the php error list, with the plugin that creates the error
    But there is no list of active extensions
    I do see that 60 scripts are present
    But not the list like you are showing
    Regards,
    Peter

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    Maybe this information helps you correct the error
    I added a dump to debug for the version string
    [22-May-2019 12:35:52 UTC] 7.2.16
    [22-May-2019 12:35:52 UTC] 7.2.16
    [22-May-2019 12:35:52 UTC] on Mon 11 Mar 10:58:36 CET 2019
    [22-May-2019 12:35:52 UTC] PHP Notice: Uninitialized string offset: 0 in /www/wp-content/plugins/query-monitor/collectors/environment.php on line 256
    [22-May-2019 12:35:52 UTC] 7.2.16

    It appears to me that the line containint “on Mon” does cause the problem
    Regards,
    Peter

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    Here is the solution to fix this problem
    if ( ! $version ) {
    return $version;
    }
    $version=trim($version);
    $parts = explode( ‘ ‘, $version );

    Trim the blank if it exists from the beginning of the string.
    Then the error is no longer present !
    Regards,
    Peter

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Do you see a list of extensions and their versions with that fix in place?

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    No in PHP error reporting I still do not get a list of the running plugins
    But no warning in the errorlog also

    Thread Starter Peter Smits

    (@psmits1567)

    Hi John

    I found what you are asking for, it is within environment
    Extensions
    50
    bcmath 7.2.16
    bz2 7.2.16
    calendar 7.2.16
    cgi-fcgi false
    Core 7.2.16
    ctype 7.2.16
    curl 7.2.16
    date 7.2.16
    dom 20031129
    exif 7.2.16
    fileinfo 1.0.5
    filter 7.2.16
    ftp 7.2.16
    gd 7.2.16
    gettext 7.2.16
    hash 1.0
    iconv 7.2.16
    imap 7.2.16
    intl 1.1.0
    json 1.6.0
    libxml 7.2.16
    mbstring 7.2.16
    mysqli 7.2.16
    mysqlnd 5.0.12-dev
    openssl 7.2.16
    pcre 7.2.16
    PDO 7.2.16
    pdo_mysql 7.2.16
    pdo_sqlite 7.2.16
    Phar 2.0.2
    posix 7.2.16
    pspell 7.2.16
    Reflection 7.2.16
    session 7.2.16
    SimpleXML 7.2.16
    soap 7.2.16
    sockets 7.2.16
    SPL 7.2.16
    sqlite3 7.2.16
    standard 7.2.16
    tidy 7.2.16
    tip_wh 11
    tokenizer 7.2.16
    xml 7.2.16
    xmlreader 7.2.16
    xmlwriter 7.2.16
    xsl 7.2.16
    Zend OPcache 7.2.16
    zip 1.15.4
    zlib 7.2.16

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Yep, as I pointed out above a few times ??

    Can you do me a favour and let me know if that list still shows up without your fix in place? And if so, what the values are? I’m trying to figure out what might be the root cause of the problem.

    I suspect your server has a strange configuration which means other information is appended to the version number of installed extensions.

    Cheers.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Uninitialized string offset: 0 on line 265’ is closed to new replies.