Skip to content

lots of PHP warnings in error logs #15

Description

@gfairchild

I get a number of PHP warnings in my error logs when a page using WP-Syntax is accessed on my site:

[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2411
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  implode(): Argument must be an array in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3365
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3429
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2411
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  implode(): Argument must be an array in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3365
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3429
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  array_keys() expects parameter 1 to be array, null given in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626
[Sun Jan 05 04:35:09 2014] [error] [client x.x.x.x] PHP Warning:  Invalid argument supplied for foreach() in ~/public_html/wordpress/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626

Looks like the same erroneous use of foreach, array_keys, and implode is used repeatedly throughout geshi.php.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions