WordPress.org

Ready to get started?Download WordPress

Forums

StatPress Visitors
[resolved] too many args to filter_var (5 posts)

  1. gilles.simond@unige.ch
    Member
    Posted 1 year ago #

    Hello

    I have thsi warning using wp3.4.1 and php5.3.3

    Warning: filter_var() expects at most 3 parameters, 4 given in /export/WWW/wordpress/wp-content/plugins/statpress-visitors/statpress.php on line 350

    Gilles Simond

    http://wordpress.org/extend/plugins/statpress-visitors/

  2. luciole135
    Member
    Plugin Author

    Posted 1 year ago #

    re upload StatPress V, may be a corrumpted file

  3. donnerchen
    Member
    Posted 1 year ago #

    I got the same problem after upgrading to 1.5.0.3

  4. donnerchen
    Member
    Posted 1 year ago #

    Oh, and it's not a corrupted file. Line 350 of statpress.php looks like this:

    if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4, FILTER_FLAG_NO_PRIV_RANGE))

    That's one parameter too much. The manual entry for filter_var() states, that only three parameters may be used:

    filter_var ( mixed $variable [, int $filter [, mixed $options ]] )

  5. gilles.simond@unige.ch
    Member
    Posted 1 year ago #

    perhaps FILTER_FLAG_IPV4, FILTER_FLAG_NO_PRIV_RANGE should be replaced by
    FILTER_FLAG_IPV4|FILTER_FLAG_NO_PRIV_RANGE

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.