Skip to content

Commit fc1f94d

Browse files
committed
Drop GD tests as those need more investigation
1 parent f733774 commit fc1f94d

7 files changed

+8
-109
lines changed

ext/gd/gd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,9 +1546,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15461546
/* needs to be malloc (persistent) - GD will free() it later */
15471547
pstr = pestrndup(ZSTR_VAL(buff), ZSTR_LEN(buff), 1);
15481548
io_ctx = gdNewDynamicCtxEx(ZSTR_LEN(buff), pstr, 0);
1549-
pefree(pstr, 1);
1550-
zend_string_release_ex(buff, 0);
15511549
if (!io_ctx) {
1550+
pefree(pstr, 1);
1551+
zend_string_release_ex(buff, 0);
15521552
php_error_docref(NULL, E_WARNING,"Cannot allocate GD IO context");
15531553
goto out_err;
15541554
}
@@ -1559,8 +1559,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15591559
im = (*ioctx_func_p)(io_ctx);
15601560
}
15611561
io_ctx->gd_free(io_ctx);
1562+
pefree(pstr, 1);
1563+
zend_string_release_ex(buff, 0);
15621564
}
1563-
/* try and force the stream to be FILE* */
15641565
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) {
15651566
/* try and force the stream to be FILE* */
15661567
if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_TRY_HARD, (void **) &fp, REPORT_ERRORS)) {

ext/gd/tests/gd_create_xbm_non_castable_user_stream.phpt

Lines changed: 0 additions & 25 deletions
This file was deleted.

ext/gd/tests/gd_create_xbm_non_castable_user_stream_no_copy_file_range.phpt

Lines changed: 0 additions & 25 deletions
This file was deleted.

ext/gd/tests/gd_create_xbm_stream_lose_data.phpt

Lines changed: 0 additions & 35 deletions
This file was deleted.

ext/zend_test/test.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -516,17 +516,6 @@ static ZEND_FUNCTION(zend_test_zend_call_stack_use_all)
516516
}
517517
#endif /* ZEND_CHECK_STACK_LIMIT */
518518

519-
static ZEND_FUNCTION(zend_test_has_c_copy_file_range)
520-
{
521-
ZEND_PARSE_PARAMETERS_NONE();
522-
523-
#ifdef HAVE_COPY_FILE_RANGE
524-
RETURN_TRUE;
525-
#else
526-
RETURN_FALSE;
527-
#endif
528-
}
529-
530519
static zend_object *zend_test_class_new(zend_class_entry *class_type)
531520
{
532521
zend_object *obj = zend_objects_new(class_type);

ext/zend_test/test.stub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ function zend_test_zend_ini_str(): string {}
178178
function zend_test_zend_call_stack_get(): ?array {}
179179
function zend_test_zend_call_stack_use_all(): int {}
180180
#endif
181-
182-
function zend_test_has_c_copy_file_range(): bool {}
183181
}
184182

185183
namespace ZendTestNS {

ext/zend_test/test_arginfo.h

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)