mirror of
https://github.com/php/php-src.git
synced 2025-01-20 18:53:37 +08:00
- Added missing void arg checks
This commit is contained in:
parent
5f31c44509
commit
8192f0f771
@ -339,14 +339,13 @@ PHP_FUNCTION(spl_autoload)
|
||||
Register and return default file extensions for spl_autoload */
|
||||
PHP_FUNCTION(spl_autoload_extensions)
|
||||
{
|
||||
char *file_exts;
|
||||
char *file_exts = NULL;
|
||||
int file_exts_len;
|
||||
|
||||
if (ZEND_NUM_ARGS() > 0) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file_exts, &file_exts_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &file_exts, &file_exts_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (file_exts) {
|
||||
if (SPL_G(autoload_extensions)) {
|
||||
efree(SPL_G(autoload_extensions));
|
||||
}
|
||||
@ -676,6 +675,10 @@ PHP_FUNCTION(spl_autoload_functions)
|
||||
HashPosition function_pos;
|
||||
autoload_func_info *alfi;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EG(autoload_func)) {
|
||||
if (zend_hash_find(EG(function_table), ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME), (void **) &fptr) == SUCCESS) {
|
||||
array_init(return_value);
|
||||
|
@ -1137,6 +1137,10 @@ SPL_METHOD(Array, getIteratorClass)
|
||||
zval *object = getThis();
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_STRING(intern->ce_get_iterator->name, 1);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1148,6 +1152,10 @@ SPL_METHOD(Array, getFlags)
|
||||
zval *object = getThis();
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->ar_flags & ~SPL_ARRAY_INT_MASK);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1196,6 +1204,10 @@ SPL_METHOD(Array, getIterator)
|
||||
spl_array_object *iterator;
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
@ -1215,6 +1227,10 @@ SPL_METHOD(Array, rewind)
|
||||
zval *object = getThis();
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_array_rewind(intern TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1310,6 +1326,10 @@ SPL_METHOD(Array, count)
|
||||
long count;
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_array_object_count_elements_helper(intern, &count TSRMLS_CC);
|
||||
|
||||
RETURN_LONG(count);
|
||||
@ -1393,6 +1413,10 @@ SPL_METHOD(Array, current)
|
||||
zval **entry;
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
@ -1414,6 +1438,10 @@ SPL_METHOD(Array, current)
|
||||
Return current array key */
|
||||
SPL_METHOD(Array, key)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_array_iterator_key(getThis(), return_value TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -1456,6 +1484,10 @@ SPL_METHOD(Array, next)
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
@ -1473,6 +1505,10 @@ SPL_METHOD(Array, valid)
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
@ -1495,6 +1531,10 @@ SPL_METHOD(Array, hasChildren)
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
RETURN_FALSE;
|
||||
@ -1521,6 +1561,10 @@ SPL_METHOD(Array, getChildren)
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
@ -1563,6 +1607,10 @@ SPL_METHOD(Array, serialize)
|
||||
smart_str buf = {0};
|
||||
zval *flags;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aht) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no longer an array");
|
||||
return;
|
||||
|
@ -678,6 +678,10 @@ SPL_METHOD(DirectoryIterator, rewind)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->u.dir.index = 0;
|
||||
if (intern->u.dir.dirp) {
|
||||
php_stream_rewinddir(intern->u.dir.dirp);
|
||||
@ -692,6 +696,10 @@ SPL_METHOD(DirectoryIterator, key)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->u.dir.dirp) {
|
||||
RETURN_LONG(intern->u.dir.index);
|
||||
} else {
|
||||
@ -704,6 +712,9 @@ SPL_METHOD(DirectoryIterator, key)
|
||||
Return this (needed for Iterator interface) */
|
||||
SPL_METHOD(DirectoryIterator, current)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
RETURN_ZVAL(getThis(), 1, 0);
|
||||
}
|
||||
/* }}} */
|
||||
@ -715,6 +726,10 @@ SPL_METHOD(DirectoryIterator, next)
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
int skip_dots = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_SKIPDOTS);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->u.dir.index++;
|
||||
do {
|
||||
spl_filesystem_dir_read(intern TSRMLS_CC);
|
||||
@ -769,6 +784,10 @@ SPL_METHOD(DirectoryIterator, valid)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(intern->u.dir.entry.d_name[0] != '\0');
|
||||
}
|
||||
/* }}} */
|
||||
@ -781,6 +800,10 @@ SPL_METHOD(SplFileInfo, getPath)
|
||||
char *path;
|
||||
int path_len;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
path = spl_filesystem_object_get_path(intern, &path_len TSRMLS_CC);
|
||||
RETURN_STRINGL(path, path_len, 1);
|
||||
}
|
||||
@ -793,6 +816,10 @@ SPL_METHOD(SplFileInfo, getFilename)
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
int path_len;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_filesystem_object_get_path(intern, &path_len TSRMLS_CC);
|
||||
|
||||
if (path_len && path_len < intern->file_name_len) {
|
||||
@ -809,6 +836,10 @@ SPL_METHOD(DirectoryIterator, getFilename)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_STRING(intern->u.dir.entry.d_name, 1);
|
||||
}
|
||||
/* }}} */
|
||||
@ -868,6 +899,10 @@ SPL_METHOD(SplFileInfo, getPathname)
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
char *path;
|
||||
int path_len;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
path = spl_filesystem_object_get_pathname(intern, &path_len TSRMLS_CC);
|
||||
if (path != NULL) {
|
||||
RETURN_STRINGL(path, path_len, 1);
|
||||
@ -883,6 +918,10 @@ SPL_METHOD(FilesystemIterator, key)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SPL_FILE_DIR_KEY(intern, SPL_FILE_DIR_KEY_AS_FILENAME)) {
|
||||
RETURN_STRING(intern->u.dir.entry.d_name, 1);
|
||||
} else {
|
||||
@ -898,6 +937,10 @@ SPL_METHOD(FilesystemIterator, current)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
|
||||
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
|
||||
RETURN_STRINGL(intern->file_name, intern->file_name_len, 1);
|
||||
@ -917,6 +960,10 @@ SPL_METHOD(DirectoryIterator, isDot)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(spl_filesystem_is_dot(intern->u.dir.entry.d_name));
|
||||
}
|
||||
/* }}} */
|
||||
@ -960,6 +1007,9 @@ SPL_METHOD(SplFileInfo, func_name) \
|
||||
{ \
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \
|
||||
zend_error_handling error_handling; \
|
||||
if (zend_parse_parameters_none() == FAILURE) { \
|
||||
return; \
|
||||
} \
|
||||
\
|
||||
zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC);\
|
||||
spl_filesystem_object_get_file_name(intern TSRMLS_CC); \
|
||||
@ -1052,6 +1102,10 @@ SPL_METHOD(SplFileInfo, getLinkTarget)
|
||||
char buff[MAXPATHLEN];
|
||||
zend_error_handling error_handling;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC);
|
||||
|
||||
#if defined(PHP_WIN32) || HAVE_SYMLINK
|
||||
@ -1096,6 +1150,10 @@ SPL_METHOD(SplFileInfo, getRealPath)
|
||||
char *filename;
|
||||
zend_error_handling error_handling;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC);
|
||||
|
||||
if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) {
|
||||
@ -1228,6 +1286,10 @@ SPL_METHOD(FilesystemIterator, rewind)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->u.dir.index = 0;
|
||||
if (intern->u.dir.dirp) {
|
||||
php_stream_rewinddir(intern->u.dir.dirp);
|
||||
@ -1244,6 +1306,10 @@ SPL_METHOD(FilesystemIterator, getFlags)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->flags & (SPL_FILE_DIR_KEY_MODE_MASK | SPL_FILE_DIR_CURRENT_MODE_MASK | SPL_FILE_DIR_OTHERS_MASK));
|
||||
} /* }}} */
|
||||
|
||||
@ -1254,7 +1320,9 @@ SPL_METHOD(FilesystemIterator, setFlags)
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
long flags;
|
||||
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags);
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern->flags &= ~(SPL_FILE_DIR_KEY_MODE_MASK|SPL_FILE_DIR_CURRENT_MODE_MASK|SPL_FILE_DIR_OTHERS_MASK);
|
||||
intern->flags |= ((SPL_FILE_DIR_KEY_MODE_MASK|SPL_FILE_DIR_CURRENT_MODE_MASK|SPL_FILE_DIR_OTHERS_MASK) & flags);
|
||||
@ -1267,12 +1335,12 @@ SPL_METHOD(RecursiveDirectoryIterator, hasChildren)
|
||||
zend_bool allow_links = 0;
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &allow_links) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (spl_filesystem_is_invalid_or_dot(intern->u.dir.entry.d_name)) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &allow_links) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
|
||||
if (!allow_links && !(intern->flags & SPL_FILE_DIR_FOLLOW_SYMLINKS)) {
|
||||
php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC);
|
||||
@ -1294,6 +1362,10 @@ SPL_METHOD(RecursiveDirectoryIterator, getChildren)
|
||||
spl_filesystem_object *subdir;
|
||||
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
|
||||
|
||||
if (SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
|
||||
@ -1327,6 +1399,10 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPath)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->u.dir.sub_path) {
|
||||
RETURN_STRINGL(intern->u.dir.sub_path, intern->u.dir.sub_path_len, 1);
|
||||
} else {
|
||||
@ -1344,6 +1420,10 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPathname)
|
||||
int len;
|
||||
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->u.dir.sub_path) {
|
||||
len = spprintf(&sub_name, 0, "%s%c%s", intern->u.dir.sub_path, slash, intern->u.dir.entry.d_name);
|
||||
RETURN_STRINGL(sub_name, len, 0);
|
||||
@ -1375,6 +1455,10 @@ SPL_METHOD(GlobIterator, count)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (php_stream_is(intern->u.dir.dirp ,&php_glob_stream_ops)) {
|
||||
RETURN_LONG(php_glob_stream_get_count(intern->u.dir.dirp, NULL));
|
||||
} else {
|
||||
@ -2119,6 +2203,10 @@ SPL_METHOD(SplFileObject, rewind)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_filesystem_file_rewind(getThis(), intern TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -2128,6 +2216,10 @@ SPL_METHOD(SplFileObject, eof)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(php_stream_eof(intern->u.file.stream));
|
||||
} /* }}} */
|
||||
|
||||
@ -2137,6 +2229,10 @@ SPL_METHOD(SplFileObject, valid)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) {
|
||||
RETURN_BOOL(intern->u.file.current_line || intern->u.file.current_zval);
|
||||
} else {
|
||||
@ -2150,6 +2246,10 @@ SPL_METHOD(SplFileObject, fgets)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (spl_filesystem_file_read(intern, 0 TSRMLS_CC) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@ -2162,6 +2262,10 @@ SPL_METHOD(SplFileObject, current)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!intern->u.file.current_line && !intern->u.file.current_zval) {
|
||||
spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC);
|
||||
}
|
||||
@ -2179,6 +2283,10 @@ SPL_METHOD(SplFileObject, key)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Do not read the next line to support correct counting with fgetc()
|
||||
if (!intern->current_line) {
|
||||
spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC);
|
||||
@ -2192,6 +2300,10 @@ SPL_METHOD(SplFileObject, next)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_filesystem_file_free_line(intern TSRMLS_CC);
|
||||
if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) {
|
||||
spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC);
|
||||
@ -2214,6 +2326,10 @@ SPL_METHOD(SplFileObject, getFlags)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->flags & SPL_FILE_OBJECT_MASK);
|
||||
} /* }}} */
|
||||
|
||||
@ -2243,6 +2359,10 @@ SPL_METHOD(SplFileObject, getMaxLineLen)
|
||||
{
|
||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG((long)intern->u.file.max_line_len);
|
||||
} /* }}} */
|
||||
|
||||
@ -2250,6 +2370,10 @@ SPL_METHOD(SplFileObject, getMaxLineLen)
|
||||
Return false */
|
||||
SPL_METHOD(SplFileObject, hasChildren)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_FALSE;
|
||||
} /* }}} */
|
||||
|
||||
@ -2257,6 +2381,9 @@ SPL_METHOD(SplFileObject, hasChildren)
|
||||
Read NULL */
|
||||
SPL_METHOD(SplFileObject, getChildren)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* return NULL */
|
||||
} /* }}} */
|
||||
|
||||
|
@ -1046,6 +1046,10 @@ SPL_METHOD(SplDoublyLinkedList, key)
|
||||
{
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->traverse_position);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1056,6 +1060,10 @@ SPL_METHOD(SplDoublyLinkedList, prev)
|
||||
{
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->llist, intern->flags ^ SPL_DLLIST_IT_LIFO TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1066,6 +1074,10 @@ SPL_METHOD(SplDoublyLinkedList, next)
|
||||
{
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->llist, intern->flags TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1076,6 +1088,10 @@ SPL_METHOD(SplDoublyLinkedList, valid)
|
||||
{
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(intern->traverse_pointer != NULL);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1086,6 +1102,10 @@ SPL_METHOD(SplDoublyLinkedList, rewind)
|
||||
{
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_dllist_it_helper_rewind(&intern->traverse_pointer, &intern->traverse_position, intern->llist, intern->flags TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1097,6 +1117,10 @@ SPL_METHOD(SplDoublyLinkedList, current)
|
||||
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
spl_ptr_llist_element *element = intern->traverse_pointer;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (element == NULL || element->data == NULL) {
|
||||
RETURN_NULL();
|
||||
} else {
|
||||
|
@ -985,6 +985,10 @@ SPL_METHOD(SplHeap, key)
|
||||
{
|
||||
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->heap->count - 1);
|
||||
}
|
||||
/* }}} */
|
||||
@ -996,6 +1000,10 @@ SPL_METHOD(SplHeap, next)
|
||||
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
spl_ptr_heap_element elem = spl_ptr_heap_delete_top(intern->heap, getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (elem != NULL) {
|
||||
zval_ptr_dtor((zval **)&elem);
|
||||
}
|
||||
@ -1008,6 +1016,10 @@ SPL_METHOD(SplHeap, valid)
|
||||
{
|
||||
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(intern->heap->count != 0);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1016,6 +1028,9 @@ SPL_METHOD(SplHeap, valid)
|
||||
Rewind the datastructure back to the start */
|
||||
SPL_METHOD(SplHeap, rewind)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* do nothing, the iterator always points to the top element */
|
||||
}
|
||||
/* }}} */
|
||||
@ -1027,6 +1042,10 @@ SPL_METHOD(SplHeap, current)
|
||||
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
zval *element = (zval *)intern->heap->elements[0];
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!intern->heap->count || !element) {
|
||||
RETURN_NULL();
|
||||
} else {
|
||||
@ -1042,6 +1061,10 @@ SPL_METHOD(SplPriorityQueue, current)
|
||||
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
zval **element = (zval **)&intern->heap->elements[0];
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!intern->heap->count || !*element) {
|
||||
RETURN_NULL();
|
||||
} else {
|
||||
|
@ -563,6 +563,10 @@ SPL_METHOD(RecursiveIteratorIterator, rewind)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_recursive_it_rewind_ex(object, getThis() TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -572,6 +576,10 @@ SPL_METHOD(RecursiveIteratorIterator, valid)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(spl_recursive_it_valid_ex(object, getThis() TSRMLS_CC) == SUCCESS);
|
||||
} /* }}} */
|
||||
|
||||
@ -582,6 +590,10 @@ SPL_METHOD(RecursiveIteratorIterator, key)
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
zend_object_iterator *iterator = object->iterators[object->level].iterator;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (iterator->funcs->get_current_key) {
|
||||
char *str_key;
|
||||
uint str_key_len;
|
||||
@ -610,6 +622,10 @@ SPL_METHOD(RecursiveIteratorIterator, current)
|
||||
zend_object_iterator *iterator = object->iterators[object->level].iterator;
|
||||
zval **data;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
iterator->funcs->get_current_data(iterator, &data TSRMLS_CC);
|
||||
if (data && *data) {
|
||||
RETURN_ZVAL(*data, 1, 0);
|
||||
@ -622,6 +638,10 @@ SPL_METHOD(RecursiveIteratorIterator, next)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_recursive_it_move_forward_ex(object, getThis() TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -631,6 +651,10 @@ SPL_METHOD(RecursiveIteratorIterator, getDepth)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(object->level);
|
||||
} /* }}} */
|
||||
|
||||
@ -657,6 +681,10 @@ SPL_METHOD(RecursiveIteratorIterator, getInnerIterator)
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
long level = object->level;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_ZVAL(object->iterators[level].zobject, 1, 0);
|
||||
} /* }}} */
|
||||
|
||||
@ -664,6 +692,9 @@ SPL_METHOD(RecursiveIteratorIterator, getInnerIterator)
|
||||
Called when iteration begins (after first rewind() call) */
|
||||
SPL_METHOD(RecursiveIteratorIterator, beginIteration)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -671,6 +702,9 @@ SPL_METHOD(RecursiveIteratorIterator, beginIteration)
|
||||
Called when iteration ends (when valid() first returns false */
|
||||
SPL_METHOD(RecursiveIteratorIterator, endIteration)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -682,6 +716,10 @@ SPL_METHOD(RecursiveIteratorIterator, callHasChildren)
|
||||
zend_class_entry *ce = object->iterators[object->level].ce;
|
||||
zval *retval, *zobject;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zobject = object->iterators[object->level].zobject;
|
||||
if (!zobject) {
|
||||
RETURN_FALSE;
|
||||
@ -703,6 +741,10 @@ SPL_METHOD(RecursiveIteratorIterator, callGetChildren)
|
||||
zend_class_entry *ce = object->iterators[object->level].ce;
|
||||
zval *retval, *zobject;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zobject = object->iterators[object->level].zobject;
|
||||
if (!zobject) {
|
||||
return;
|
||||
@ -718,6 +760,9 @@ SPL_METHOD(RecursiveIteratorIterator, callGetChildren)
|
||||
Called when recursing one level down */
|
||||
SPL_METHOD(RecursiveIteratorIterator, beginChildren)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -725,6 +770,9 @@ SPL_METHOD(RecursiveIteratorIterator, beginChildren)
|
||||
Called when end recursing one level */
|
||||
SPL_METHOD(RecursiveIteratorIterator, endChildren)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -732,6 +780,9 @@ SPL_METHOD(RecursiveIteratorIterator, endChildren)
|
||||
Called when the next element is available */
|
||||
SPL_METHOD(RecursiveIteratorIterator, nextElement)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -758,6 +809,10 @@ SPL_METHOD(RecursiveIteratorIterator, getMaxDepth)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (object->max_depth == -1) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
@ -972,7 +1027,7 @@ SPL_METHOD(RecursiveTreeIterator, __construct)
|
||||
spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveTreeIterator, zend_ce_iterator, RIT_RecursiveTreeIterator);
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ proto void RecursiveTreeIterator::setPrefixPart() throws OutOfRangeException
|
||||
/* {{{ proto void RecursiveTreeIterator::setPrefixPart(int part, string prefix) throws OutOfRangeException
|
||||
Sets prefix parts as used in getPrefix() */
|
||||
SPL_METHOD(RecursiveTreeIterator, setPrefixPart)
|
||||
{
|
||||
@ -999,6 +1054,9 @@ SPL_METHOD(RecursiveTreeIterator, getPrefix)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
spl_recursive_tree_iterator_get_prefix(object, return_value TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -1008,6 +1066,10 @@ SPL_METHOD(RecursiveTreeIterator, getEntry)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_recursive_tree_iterator_get_entry(object, return_value TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -1017,6 +1079,10 @@ SPL_METHOD(RecursiveTreeIterator, getPostfix)
|
||||
{
|
||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_recursive_tree_iterator_get_postfix(object, return_value TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -1029,6 +1095,10 @@ SPL_METHOD(RecursiveTreeIterator, current)
|
||||
char *str, *ptr;
|
||||
size_t str_len;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (object->flags & RTIT_BYPASS_CURRENT) {
|
||||
zend_object_iterator *iterator = object->iterators[object->level].iterator;
|
||||
zval **data;
|
||||
@ -1074,6 +1144,10 @@ SPL_METHOD(RecursiveTreeIterator, key)
|
||||
char *str, *ptr;
|
||||
size_t str_len;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (iterator->funcs->get_current_key) {
|
||||
char *str_key;
|
||||
uint str_key_len;
|
||||
@ -1440,6 +1514,10 @@ SPL_METHOD(dual_it, getInnerIterator)
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->inner.zobject) {
|
||||
RETVAL_ZVAL(intern->inner.zobject, 1, 0);
|
||||
} else {
|
||||
@ -1539,6 +1617,11 @@ SPL_METHOD(dual_it, rewind)
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_dual_it_rewind(intern TSRMLS_CC);
|
||||
spl_dual_it_fetch(intern, 1 TSRMLS_CC);
|
||||
} /* }}} */
|
||||
@ -1552,6 +1635,10 @@ SPL_METHOD(dual_it, valid)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_BOOL(intern->current.data);
|
||||
@ -1569,6 +1656,10 @@ SPL_METHOD(dual_it, key)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (intern->current.data) {
|
||||
@ -1593,6 +1684,10 @@ SPL_METHOD(dual_it, current)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (intern->current.data) {
|
||||
@ -1610,6 +1705,10 @@ SPL_METHOD(dual_it, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
spl_dual_it_next(intern, 1 TSRMLS_CC);
|
||||
@ -1655,6 +1754,10 @@ SPL_METHOD(FilterIterator, rewind)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
spl_filter_it_rewind(getThis(), intern TSRMLS_CC);
|
||||
} /* }}} */
|
||||
@ -1665,6 +1768,10 @@ SPL_METHOD(FilterIterator, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
spl_filter_it_next(getThis(), intern TSRMLS_CC);
|
||||
} /* }}} */
|
||||
@ -1683,6 +1790,10 @@ SPL_METHOD(RecursiveFilterIterator, hasChildren)
|
||||
spl_dual_it_object *intern;
|
||||
zval *retval;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "haschildren", &retval);
|
||||
@ -1700,6 +1811,10 @@ SPL_METHOD(RecursiveFilterIterator, getChildren)
|
||||
spl_dual_it_object *intern;
|
||||
zval *retval;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval);
|
||||
@ -1735,6 +1850,10 @@ SPL_METHOD(RegexIterator, accept)
|
||||
int subject_len, use_copy, count = 0, result_len;
|
||||
zval subject_copy, zcount, *replacement;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->current.data == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@ -1828,6 +1947,10 @@ SPL_METHOD(RegexIterator, getMode)
|
||||
{
|
||||
spl_dual_it_object *intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->u.regex.mode);
|
||||
} /* }}} */
|
||||
|
||||
@ -1856,6 +1979,10 @@ SPL_METHOD(RegexIterator, getFlags)
|
||||
{
|
||||
spl_dual_it_object *intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->u.regex.flags);
|
||||
} /* }}} */
|
||||
|
||||
@ -1879,6 +2006,10 @@ SPL_METHOD(RegexIterator, getPregFlags)
|
||||
{
|
||||
spl_dual_it_object *intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intern->u.regex.use_flags) {
|
||||
RETURN_LONG(intern->u.regex.preg_flags);
|
||||
} else {
|
||||
@ -1915,6 +2046,10 @@ SPL_METHOD(RecursiveRegexIterator, getChildren)
|
||||
spl_dual_it_object *intern;
|
||||
zval *retval, *regex;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval);
|
||||
@ -2355,6 +2490,10 @@ SPL_METHOD(CachingIterator, rewind)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
spl_caching_it_rewind(intern TSRMLS_CC);
|
||||
@ -2366,6 +2505,10 @@ SPL_METHOD(CachingIterator, valid)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_BOOL(spl_caching_it_valid(intern TSRMLS_CC) == SUCCESS);
|
||||
@ -2377,6 +2520,10 @@ SPL_METHOD(CachingIterator, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
spl_caching_it_next(intern TSRMLS_CC);
|
||||
@ -2388,6 +2535,10 @@ SPL_METHOD(CachingIterator, hasNext)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_BOOL(spl_caching_it_has_next(intern TSRMLS_CC) == SUCCESS);
|
||||
@ -2531,6 +2682,10 @@ SPL_METHOD(CachingIterator, getCache)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (!(intern->u.caching.flags & CIT_FULL_CACHE)) {
|
||||
@ -2548,6 +2703,10 @@ SPL_METHOD(CachingIterator, getFlags)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_LONG(intern->u.caching.flags);
|
||||
@ -2593,6 +2752,10 @@ SPL_METHOD(CachingIterator, count)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (!(intern->u.caching.flags & CIT_FULL_CACHE)) {
|
||||
@ -2656,6 +2819,10 @@ SPL_METHOD(RecursiveCachingIterator, hasChildren)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_BOOL(intern->u.caching.zchildren);
|
||||
@ -2667,6 +2834,10 @@ SPL_METHOD(RecursiveCachingIterator, getChildren)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (intern->u.caching.zchildren) {
|
||||
@ -2721,6 +2892,9 @@ SPL_METHOD(NoRewindIterator, __construct)
|
||||
Prevent a call to inner iterators rewind() */
|
||||
SPL_METHOD(NoRewindIterator, rewind)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* nothing to do */
|
||||
} /* }}} */
|
||||
|
||||
@ -2730,6 +2904,10 @@ SPL_METHOD(NoRewindIterator, valid)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
RETURN_BOOL(intern->inner.iterator->funcs->valid(intern->inner.iterator TSRMLS_CC) == SUCCESS);
|
||||
} /* }}} */
|
||||
@ -2740,6 +2918,10 @@ SPL_METHOD(NoRewindIterator, key)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (intern->inner.iterator->funcs->get_current_key) {
|
||||
@ -2768,6 +2950,10 @@ SPL_METHOD(NoRewindIterator, current)
|
||||
spl_dual_it_object *intern;
|
||||
zval **data;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
intern->inner.iterator->funcs->get_current_data(intern->inner.iterator, &data TSRMLS_CC);
|
||||
if (data && *data) {
|
||||
@ -2781,6 +2967,10 @@ SPL_METHOD(NoRewindIterator, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
intern->inner.iterator->funcs->move_forward(intern->inner.iterator TSRMLS_CC);
|
||||
} /* }}} */
|
||||
@ -2813,6 +3003,10 @@ SPL_METHOD(InfiniteIterator, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
spl_dual_it_next(intern, 1 TSRMLS_CC);
|
||||
@ -2836,12 +3030,18 @@ static const zend_function_entry spl_funcs_InfiniteIterator[] = {
|
||||
Does nothing */
|
||||
SPL_METHOD(EmptyIterator, rewind)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ proto false EmptyIterator::valid()
|
||||
Return false */
|
||||
SPL_METHOD(EmptyIterator, valid)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
RETURN_FALSE;
|
||||
} /* }}} */
|
||||
|
||||
@ -2849,6 +3049,9 @@ SPL_METHOD(EmptyIterator, valid)
|
||||
Throws exception BadMethodCallException */
|
||||
SPL_METHOD(EmptyIterator, key)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the key of an EmptyIterator", 0 TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -2856,6 +3059,9 @@ SPL_METHOD(EmptyIterator, key)
|
||||
Throws exception BadMethodCallException */
|
||||
SPL_METHOD(EmptyIterator, current)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the value of an EmptyIterator", 0 TSRMLS_CC);
|
||||
} /* }}} */
|
||||
|
||||
@ -2863,6 +3069,9 @@ SPL_METHOD(EmptyIterator, current)
|
||||
Does nothing */
|
||||
SPL_METHOD(EmptyIterator, next)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
static const zend_function_entry spl_funcs_EmptyIterator[] = {
|
||||
@ -2963,6 +3172,10 @@ SPL_METHOD(AppendIterator, rewind)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
intern->u.append.iterator->funcs->rewind(intern->u.append.iterator TSRMLS_CC);
|
||||
@ -2977,6 +3190,10 @@ SPL_METHOD(AppendIterator, valid)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
RETURN_BOOL(intern->current.data);
|
||||
@ -2988,6 +3205,10 @@ SPL_METHOD(AppendIterator, next)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
spl_append_it_next(intern TSRMLS_CC);
|
||||
@ -2999,6 +3220,10 @@ SPL_METHOD(AppendIterator, getIteratorIndex)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
APPENDIT_CHECK_CTOR(intern);
|
||||
@ -3011,6 +3236,10 @@ SPL_METHOD(AppendIterator, getArrayIterator)
|
||||
{
|
||||
spl_dual_it_object *intern;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
APPENDIT_CHECK_CTOR(intern);
|
||||
|
@ -599,6 +599,10 @@ SPL_METHOD(SplObjectStorage, count)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(zend_hash_num_elements(&intern->storage));
|
||||
} /* }}} */
|
||||
|
||||
@ -608,6 +612,10 @@ SPL_METHOD(SplObjectStorage, rewind)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
|
||||
intern->index = 0;
|
||||
} /* }}} */
|
||||
@ -618,6 +626,10 @@ SPL_METHOD(SplObjectStorage, valid)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL(zend_hash_has_more_elements_ex(&intern->storage, &intern->pos) == SUCCESS);
|
||||
} /* }}} */
|
||||
|
||||
@ -627,6 +639,10 @@ SPL_METHOD(SplObjectStorage, key)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intern->index);
|
||||
} /* }}} */
|
||||
|
||||
@ -637,6 +653,10 @@ SPL_METHOD(SplObjectStorage, current)
|
||||
spl_SplObjectStorageElement *element;
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
@ -650,6 +670,10 @@ SPL_METHOD(SplObjectStorage, getInfo)
|
||||
spl_SplObjectStorageElement *element;
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
@ -682,6 +706,10 @@ SPL_METHOD(SplObjectStorage, next)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_hash_move_forward_ex(&intern->storage, &intern->pos);
|
||||
intern->index++;
|
||||
} /* }}} */
|
||||
@ -698,6 +726,10 @@ SPL_METHOD(SplObjectStorage, serialize)
|
||||
php_serialize_data_t var_hash;
|
||||
smart_str buf = {0};
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
PHP_VAR_SERIALIZE_INIT(var_hash);
|
||||
|
||||
/* storage */
|
||||
@ -966,6 +998,10 @@ SPL_METHOD(MultipleIterator, __construct)
|
||||
SPL_METHOD(MultipleIterator, getFlags)
|
||||
{
|
||||
spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
RETURN_LONG(intern->flags);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1030,6 +1066,10 @@ SPL_METHOD(MultipleIterator, rewind)
|
||||
|
||||
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
|
||||
while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS && !EG(exception)) {
|
||||
it = element->obj;
|
||||
@ -1049,6 +1089,10 @@ SPL_METHOD(MultipleIterator, next)
|
||||
|
||||
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
|
||||
while (zend_hash_get_current_data_ex(&intern->storage, (void**)&element, &intern->pos) == SUCCESS && !EG(exception)) {
|
||||
it = element->obj;
|
||||
@ -1069,6 +1113,10 @@ SPL_METHOD(MultipleIterator, valid)
|
||||
|
||||
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!zend_hash_num_elements(&intern->storage)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@ -1173,6 +1221,10 @@ SPL_METHOD(MultipleIterator, current)
|
||||
spl_SplObjectStorage *intern;
|
||||
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1184,6 +1236,10 @@ SPL_METHOD(MultipleIterator, key)
|
||||
spl_SplObjectStorage *intern;
|
||||
intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_KEY, return_value TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -67,7 +67,9 @@ int(99)
|
||||
int(2)
|
||||
int(99)
|
||||
int(1)
|
||||
int(1)
|
||||
|
||||
Warning: ArrayObject::count() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
==ArrayIterator==
|
||||
int(99)
|
||||
int(0)
|
||||
@ -77,4 +79,6 @@ int(99)
|
||||
int(2)
|
||||
int(99)
|
||||
int(1)
|
||||
int(1)
|
||||
|
||||
Warning: ArrayIterator::count() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
@ -33,7 +33,9 @@ unlink($path);
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
string(4) "blah"
|
||||
|
||||
Warning: SplFileObject::fgets() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: SplFileObject::ftruncate() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
Loading…
Reference in New Issue
Block a user