@@ -921,7 +921,7 @@ static int parse_context_params(php_stream_context *context, zval *params)
921
921
if (Z_TYPE_P (tmp ) == IS_ARRAY ) {
922
922
return parse_context_options (context , tmp );
923
923
} else {
924
- zend_value_error ("Invalid stream/context parameter" );
924
+ zend_type_error ("Invalid stream/context parameter" );
925
925
return FAILURE ;
926
926
}
927
927
}
@@ -972,7 +972,7 @@ PHP_FUNCTION(stream_context_get_options)
972
972
973
973
context = decode_context_param (zcontext );
974
974
if (!context ) {
975
- zend_value_error ("Invalid stream/context parameter" );
975
+ zend_type_error ("Invalid stream/context parameter" );
976
976
return ;
977
977
}
978
978
@@ -997,7 +997,7 @@ PHP_FUNCTION(stream_context_set_option)
997
997
998
998
/* figure out where the context is coming from exactly */
999
999
if (!(context = decode_context_param (zcontext ))) {
1000
- zend_value_error ("Invalid stream/context parameter" );
1000
+ zend_type_error ("Invalid stream/context parameter" );
1001
1001
return ;
1002
1002
}
1003
1003
@@ -1016,7 +1016,7 @@ PHP_FUNCTION(stream_context_set_option)
1016
1016
1017
1017
/* figure out where the context is coming from exactly */
1018
1018
if (!(context = decode_context_param (zcontext ))) {
1019
- zend_value_error ("Invalid stream/context parameter" );
1019
+ zend_type_error ("Invalid stream/context parameter" );
1020
1020
return ;
1021
1021
}
1022
1022
@@ -1039,7 +1039,7 @@ PHP_FUNCTION(stream_context_set_params)
1039
1039
1040
1040
context = decode_context_param (zcontext );
1041
1041
if (!context ) {
1042
- zend_value_error ("Invalid stream/context parameter" );
1042
+ zend_type_error ("Invalid stream/context parameter" );
1043
1043
return ;
1044
1044
}
1045
1045
@@ -1060,7 +1060,7 @@ PHP_FUNCTION(stream_context_get_params)
1060
1060
1061
1061
context = decode_context_param (zcontext );
1062
1062
if (!context ) {
1063
- zend_value_error ("Invalid stream/context parameter" );
1063
+ zend_type_error ("Invalid stream/context parameter" );
1064
1064
return ;
1065
1065
}
1066
1066
@@ -1259,9 +1259,8 @@ PHP_FUNCTION(stream_filter_remove)
1259
1259
Z_PARAM_RESOURCE (zfilter )
1260
1260
ZEND_PARSE_PARAMETERS_END ();
1261
1261
1262
- filter = zend_fetch_resource (Z_RES_P (zfilter ), NULL , php_file_le_stream_filter ());
1262
+ filter = zend_fetch_resource (Z_RES_P (zfilter ), "stream filter" , php_file_le_stream_filter ());
1263
1263
if (!filter ) {
1264
- zend_value_error ("Invalid resource given, not a stream filter" );
1265
1264
return ;
1266
1265
}
1267
1266
@@ -1435,7 +1434,7 @@ PHP_FUNCTION(stream_set_chunk_size)
1435
1434
ZEND_PARSE_PARAMETERS_END ();
1436
1435
1437
1436
if (csize <= 0 ) {
1438
- zend_value_error ("The chunk size must be a positive integer, given " ZEND_LONG_FMT , csize );
1437
+ zend_value_error ("The chunk size must be a positive integer, " ZEND_LONG_FMT " given" , csize );
1439
1438
return ;
1440
1439
}
1441
1440
/* stream.chunk_size is actually a size_t, but php_stream_set_option
0 commit comments