WordPress.org

Forums

Advanced Browser Check
[resolved] Invalid argument in output.php (6 posts)

  1. gsingh93
    Member
    Posted 2 years ago #

    Whenever the plugin detects an older browser, it displays the popup correctly but at the top of the screen it shows me an error that looks something like "Warning: Invalid argument supplied for foreach() in .../advanced-browser-check/output.php on line 37". I looked at that line of code and did some debugging but couldn't find anything wrong with it.

    Do you see this error? Do you have any idea what's causing it?

    http://wordpress.org/extend/plugins/advanced-browser-check/

  2. Mattias
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Thanks for the report, I will look into this.

  3. Mattias
    Member
    Plugin Author

    Posted 2 years ago #

    Hi again,

    I have looked thought the code and I can't replicate your problem.

    What browser are you getting this error in? What version of the plugin are you using? and what settings do you have on the settings page?

    Thanks

  4. gsingh93
    Member
    Posted 2 years ago #

    Hi,

    I tested this on both my local machine and on my live site and it only occurs on my live site. One major difference that I know of between the two is the live site is the version of PHP. Here is the output of php --version for my live site:
    PHP 5.2.17 (cli) (built: Feb 1 2012 15:01:30)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

    and here is the output for my local machine
    PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

    The important part I think is the live site uses PHP 5.2. Do you do anything that wouldn't work in PHP 5.2?

    And to answer your questions, this happens in every browser that is below the threshold, both desktop and mobile. I'm using the latest version of the plugin. And for settings, I've selected to allow the user to hide the popup, link no browsers, and the settings for the browsers don't really matter, it happens on every browser I try (I just make each setting max to test my current browser, chrome 23).

  5. Mattias
    Member
    Plugin Author

    Posted 2 years ago #

    Hi again,

    yes, your getting the error due to that your server is running php 5.2 as my plugin require php 5.3 (I should mention that somewhere in my description about the plugin).

    If you can, I really recommend you to update your web server to php 5.3

  6. gsingh93
    Member
    Posted 2 years ago #

    Hi,

    I updated my webserver to PHP 5.3.15 and I'm still experienced the error. Does the plugin require a newer version than this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Browser Check
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.