intern->u.file.open_mode_len = 1;
}
- php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC);
-
- if (Z_LVAL(tmp)) {
- zend_restore_error_handling(&error_handling TSRMLS_CC);
- intern->u.file.open_mode = NULL;
- intern->file_name = NULL;
- zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Cannot use SplFileObject with directories");
- return;
- }
-
if (spl_filesystem_file_open(intern, use_include_path, 0 TSRMLS_CC) == SUCCESS) {
tmp_path_len = strlen(intern->u.file.stream->orig_path);