@@ -351,8 +351,8 @@ PHP_FUNCTION(flock)
351
351
352
352
act = operation & 3 ;
353
353
if (act < 1 || act > 3 ) {
354
- php_error_docref ( NULL , E_WARNING , "Illegal operation argument" );
355
- RETURN_FALSE ;
354
+ zend_value_error ( "Illegal operation argument" );
355
+ return ;
356
356
}
357
357
358
358
if (wouldblock ) {
@@ -745,8 +745,8 @@ PHP_FUNCTION(file)
745
745
ZEND_PARSE_PARAMETERS_END ();
746
746
747
747
if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT )) {
748
- php_error_docref ( NULL , E_WARNING , "'" ZEND_LONG_FMT "' flag is not supported" , flags );
749
- RETURN_FALSE ;
748
+ zend_value_error ( "'" ZEND_LONG_FMT "' flag is not supported" , flags );
749
+ return ;
750
750
}
751
751
752
752
use_include_path = flags & PHP_FILE_USE_INCLUDE_PATH ;
@@ -1042,8 +1042,8 @@ PHPAPI PHP_FUNCTION(fgets)
1042
1042
efree (buf );
1043
1043
} else if (argc > 1 ) {
1044
1044
if (len <= 0 ) {
1045
- php_error_docref ( NULL , E_WARNING , "Length parameter must be greater than 0" );
1046
- RETURN_FALSE ;
1045
+ zend_value_error ( "Length parameter must be greater than 0" );
1046
+ return ;
1047
1047
}
1048
1048
1049
1049
str = zend_string_alloc (len , 0 );
@@ -1497,8 +1497,8 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
1497
1497
ZEND_PARSE_PARAMETERS_END ();
1498
1498
1499
1499
if (size < 0 ) {
1500
- php_error_docref ( NULL , E_WARNING , "Negative size is not supported" );
1501
- RETURN_FALSE ;
1500
+ zend_value_error ( "Negative size is not supported" );
1501
+ return ;
1502
1502
}
1503
1503
1504
1504
PHP_STREAM_TO_ZVAL (stream , fp );
@@ -1752,8 +1752,8 @@ PHPAPI PHP_FUNCTION(fread)
1752
1752
PHP_STREAM_TO_ZVAL (stream , res );
1753
1753
1754
1754
if (len <= 0 ) {
1755
- php_error_docref ( NULL , E_WARNING , "Length parameter must be greater than 0" );
1756
- RETURN_FALSE ;
1755
+ zend_value_error ( "Length parameter must be greater than 0" );
1756
+ return ;
1757
1757
}
1758
1758
1759
1759
str = php_stream_read_to_str (stream , len );
@@ -1831,8 +1831,8 @@ PHP_FUNCTION(fputcsv)
1831
1831
if (delimiter_str != NULL) {
1832
1832
/* Make sure that there is at least one character in string */
1833
1833
if (delimiter_str_len < 1 ) {
1834
- php_error_docref ( NULL , E_WARNING , "delimiter must be a character" );
1835
- RETURN_FALSE ;
1834
+ zend_value_error ( "delimiter must be a character" );
1835
+ return ;
1836
1836
} else if (delimiter_str_len > 1 ) {
1837
1837
php_error_docref (NULL , E_NOTICE , "delimiter must be a single character" );
1838
1838
}
@@ -1843,8 +1843,8 @@ PHP_FUNCTION(fputcsv)
1843
1843
1844
1844
if (enclosure_str != NULL ) {
1845
1845
if (enclosure_str_len < 1 ) {
1846
- php_error_docref ( NULL , E_WARNING , "enclosure must be a character" );
1847
- RETURN_FALSE ;
1846
+ zend_value_error ( "enclosure must be a character" );
1847
+ return ;
1848
1848
} else if (enclosure_str_len > 1 ) {
1849
1849
php_error_docref (NULL , E_NOTICE , "enclosure must be a single character" );
1850
1850
}
@@ -1969,8 +1969,8 @@ PHP_FUNCTION(fgetcsv)
1969
1969
if (delimiter_str != NULL ) {
1970
1970
/* Make sure that there is at least one character in string */
1971
1971
if (delimiter_str_len < 1 ) {
1972
- php_error_docref ( NULL , E_WARNING , "delimiter must be a character" );
1973
- RETURN_FALSE ;
1972
+ zend_value_error ( "delimiter must be a character" );
1973
+ return ;
1974
1974
} else if (delimiter_str_len > 1 ) {
1975
1975
php_error_docref (NULL , E_NOTICE , "delimiter must be a single character" );
1976
1976
}
@@ -1981,8 +1981,8 @@ PHP_FUNCTION(fgetcsv)
1981
1981
1982
1982
if (enclosure_str != NULL ) {
1983
1983
if (enclosure_str_len < 1 ) {
1984
- php_error_docref ( NULL , E_WARNING , "enclosure must be a character" );
1985
- RETURN_FALSE ;
1984
+ zend_value_error ( "enclosure must be a character" );
1985
+ return ;
1986
1986
} else if (enclosure_str_len > 1 ) {
1987
1987
php_error_docref (NULL , E_NOTICE , "enclosure must be a single character" );
1988
1988
}
@@ -2006,8 +2006,8 @@ PHP_FUNCTION(fgetcsv)
2006
2006
if (len_zv != NULL && Z_TYPE_P (len_zv ) != IS_NULL ) {
2007
2007
len = zval_get_long (len_zv );
2008
2008
if (len < 0 ) {
2009
- php_error_docref ( NULL , E_WARNING , "Length parameter may not be negative" );
2010
- RETURN_FALSE ;
2009
+ zend_value_error ( "Length parameter may not be negative" );
2010
+ return ;
2011
2011
} else if (len == 0 ) {
2012
2012
len = -1 ;
2013
2013
}
0 commit comments