svn: /php/php-src/trunk/ext/spl/ spl_directory.c
| From: | Etienne Kneuss | Date: | Mon, 08 Aug 2011 12:05:34 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/spl/ spl_directory.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65779@lists.php.net to get a copy of this message | ||
colder Mon, 08 Aug 2011 12:05:34 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314485
Log:
Fix validator for SplFileInfo constructor
Changed paths:
U php/php-src/trunk/ext/spl/spl_directory.c
Modified: php/php-src/trunk/ext/spl/spl_directory.c
===================================================================
--- php/php-src/trunk/ext/spl/spl_directory.c 2011-08-08 11:57:18 UTC (rev 314484)
+++ php/php-src/trunk/ext/spl/spl_directory.c 2011-08-08 12:05:34 UTC (rev 314485)
@@ -633,6 +633,7 @@
* constructor or cleared its exception */
return (fsobj->u.dir.entry.d_name[0] != '\0' /* GlobIterator */ ||
+ fsobj->_path != NULL /* SplFileInfo */ ||
fsobj->orig_path != NULL /* Spl[Temp]FileObject */);
}
/* }}} */
@@ -2431,7 +2432,9 @@
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis()
TSRMLS_CC);
- zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags);
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags) ==
FAILURE) {
+ return;
+ }
} /* }}} */
/* {{{ proto int SplFileObject::getFlags()