WordPress.org

Forums

Fatal error: Call to undefined function: scandir() (2 posts)

  1. Devin Price
    Member
    Posted 5 years ago #

    Does anyone know why I would be getting this message?

    Fatal error: Call to undefined function: scandir()

    Code looks like this, and is working on other servers. I am using PHP5.

    // Fetch alternate theme stylesheets
    $alt_stylesheet_dir = CHILDTHEME_THEME_DIRECTORY . 'styles/';
    $alt_stylesheets = array();
    
    if (is_dir($alt_stylesheet_dir)) {
      $styles = scandir($alt_stylesheet_dir);
      foreach ($styles as $style) {
        if (strpos($style, '.css')) {
          $alt_stylesheets[] = $style;
        }
      }
    }
  2. Devin Price
    Member
    Posted 5 years ago #

    Okay, I thought I was running PHP5. Wasn't. Bug fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.