WordPress.org

Support

Support » Plugins and Hacks » Warnings on file system functions

Warnings on file system functions

  • Using version 2.1.7 on a Windows XAMPP localhost test site, once I got the code working by changing the php shorttags, I get several warnings on my gallery page.

    Warning: readdir() expects parameter 1 to be resource, boolean given in C:\Data\xampplite\htdocs\testsite\wp-content\plugins\ungallery\no_fancybox.php on line 76
    Warning: closedir() expects parameter 1 to be resource, boolean given in C:\Data\xampplite\htdocs\testsite\wp-content\plugins\ungallery\no_fancybox.php on line 109
    Warning: readdir() expects parameter 1 to be resource, boolean given in C:\Data\xampplite\htdocs\testsite\wp-content\plugins\ungallery\no_fancybox.php on line 112
    Warning: closedir() expects parameter 1 to be resource, boolean given in C:\Data\xampplite\htdocs\testsite\wp-content\plugins\ungallery\no_fancybox.php on line 125

    I know you mention that it only works on Linux, but you could easily make it function regardless of environment. These warnings are probably caused by using a literal ‘/’ for the explode function, instead of using built-in functions such as basename and dirname and pathinfo, or even a regular expression for slash or backslash.

    http://wordpress.org/extend/plugins/ungallery/

  • The topic ‘Warnings on file system functions’ is closed to new replies.