@@ -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 ;
@@ -1040,8 +1040,8 @@ PHPAPI PHP_FUNCTION(fgets)
1040
1040
efree (buf );
1041
1041
} else if (argc > 1 ) {
1042
1042
if (len <= 0 ) {
1043
- php_error_docref ( NULL , E_WARNING , "Length parameter must be greater than 0" );
1044
- RETURN_FALSE ;
1043
+ zend_value_error ( "Length parameter must be greater than 0" );
1044
+ return ;
1045
1045
}
1046
1046
1047
1047
str = zend_string_alloc (len , 0 );
@@ -1495,8 +1495,8 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
1495
1495
ZEND_PARSE_PARAMETERS_END ();
1496
1496
1497
1497
if (size < 0 ) {
1498
- php_error_docref ( NULL , E_WARNING , "Negative size is not supported" );
1499
- RETURN_FALSE ;
1498
+ zend_value_error ( "Negative size is not supported" );
1499
+ return ;
1500
1500
}
1501
1501
1502
1502
PHP_STREAM_TO_ZVAL (stream , fp );
@@ -1750,8 +1750,8 @@ PHPAPI PHP_FUNCTION(fread)
1750
1750
PHP_STREAM_TO_ZVAL (stream , res );
1751
1751
1752
1752
if (len <= 0 ) {
1753
- php_error_docref ( NULL , E_WARNING , "Length parameter must be greater than 0" );
1754
- RETURN_FALSE ;
1753
+ zend_value_error ( "Length parameter must be greater than 0" );
1754
+ return ;
1755
1755
}
1756
1756
1757
1757
str = php_stream_read_to_str (stream , len );
@@ -1829,8 +1829,8 @@ PHP_FUNCTION(fputcsv)
1829
1829
if (delimiter_str != NULL) {
1830
1830
/* Make sure that there is at least one character in string */
1831
1831
if (delimiter_str_len < 1 ) {
1832
- php_error_docref ( NULL , E_WARNING , "delimiter must be a character" );
1833
- RETURN_FALSE ;
1832
+ zend_value_error ( "delimiter must be a character" );
1833
+ return ;
1834
1834
} else if (delimiter_str_len > 1 ) {
1835
1835
php_error_docref (NULL , E_NOTICE , "delimiter must be a single character" );
1836
1836
}
@@ -1841,8 +1841,8 @@ PHP_FUNCTION(fputcsv)
1841
1841
1842
1842
if (enclosure_str != NULL ) {
1843
1843
if (enclosure_str_len < 1 ) {
1844
- php_error_docref ( NULL , E_WARNING , "enclosure must be a character" );
1845
- RETURN_FALSE ;
1844
+ zend_value_error ( "enclosure must be a character" );
1845
+ return ;
1846
1846
} else if (enclosure_str_len > 1 ) {
1847
1847
php_error_docref (NULL , E_NOTICE , "enclosure must be a single character" );
1848
1848
}
@@ -1967,8 +1967,8 @@ PHP_FUNCTION(fgetcsv)
1967
1967
if (delimiter_str != NULL ) {
1968
1968
/* Make sure that there is at least one character in string */
1969
1969
if (delimiter_str_len < 1 ) {
1970
- php_error_docref ( NULL , E_WARNING , "delimiter must be a character" );
1971
- RETURN_FALSE ;
1970
+ zend_value_error ( "delimiter must be a character" );
1971
+ return ;
1972
1972
} else if (delimiter_str_len > 1 ) {
1973
1973
php_error_docref (NULL , E_NOTICE , "delimiter must be a single character" );
1974
1974
}
@@ -1979,8 +1979,8 @@ PHP_FUNCTION(fgetcsv)
1979
1979
1980
1980
if (enclosure_str != NULL ) {
1981
1981
if (enclosure_str_len < 1 ) {
1982
- php_error_docref ( NULL , E_WARNING , "enclosure must be a character" );
1983
- RETURN_FALSE ;
1982
+ zend_value_error ( "enclosure must be a character" );
1983
+ return ;
1984
1984
} else if (enclosure_str_len > 1 ) {
1985
1985
php_error_docref (NULL , E_NOTICE , "enclosure must be a single character" );
1986
1986
}
@@ -2004,8 +2004,8 @@ PHP_FUNCTION(fgetcsv)
2004
2004
if (len_zv != NULL && Z_TYPE_P (len_zv ) != IS_NULL ) {
2005
2005
len = zval_get_long (len_zv );
2006
2006
if (len < 0 ) {
2007
- php_error_docref ( NULL , E_WARNING , "Length parameter may not be negative" );
2008
- RETURN_FALSE ;
2007
+ zend_value_error ( "Length parameter may not be negative" );
2008
+ return ;
2009
2009
} else if (len == 0 ) {
2010
2010
len = -1 ;
2011
2011
}
0 commit comments