[php-src] Issue #21114: SplFileInfo has no method isWriteable()
| From: | JamesOlvertone | Date: | Mon, 02 Feb 2026 21:40:38 +0000 |
| Subject: | [php-src] Issue #21114: SplFileInfo has no method isWriteable() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251643@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21114
Author: JamesOlvertone
From manual page: https://php.net/class.recursivedirectoryiterator
---
The SplFileInfo Object has no isWriteable()-method:
$rdi = new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS);
$rit = new RecursiveIteratorIterator($rdi);
foreach ($rit as $fileinfo) {
//fileinfo is SplFileInfo-Object
echo $fileinfo . ":" . PHP_EOL;
$fileinfo->isDir(); // this method exists
$fileinfo->isReadable(); // this too
is_writeable($fileinfo); // this works
// error: PHP Fatal error:
//Uncaught Error: Call to undefined method SplFileInfo::isWriteable()
$fileinfo->isWriteable();
}