Fatal error: Cannot instantiate non-existent class: directoryiterator
<p>Need some help with this error. Fresh wordpress 2.9 install...</p>

<p>Fatal error: Cannot instantiate non-existent class: directoryiterator in /home1/test/public_html/test2/wp-content/themes/mytheme/functions.php on line 471</p>

<pre><code>function get_dirs($path = '.') {
$dirs = array();
foreach (new DirectoryIterator($path) as $file) {   //THIS IS LINE 471
    if ($file-&gt;isDir() &amp;&amp; !$file-&gt;isDot()) {
        $dirs[] = $file-&gt;getFilename();
    }
}

return $dirs;
</code></pre>

<p>}</p>
