Skip to content

Commit 0d3815d

Browse files
committed
Drop GD tests as those need more investigation
1 parent 0291c28 commit 0d3815d

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
@@ -1545,9 +1545,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15451545
/* needs to be malloc (persistent) - GD will free() it later */
15461546
pstr = pestrndup(ZSTR_VAL(buff), ZSTR_LEN(buff), 1);
15471547
io_ctx = gdNewDynamicCtxEx(ZSTR_LEN(buff), pstr, 0);
1548-
pefree(pstr, 1);
1549-
zend_string_release_ex(buff, 0);
15501548
if (!io_ctx) {
1549+
pefree(pstr, 1);
1550+
zend_string_release_ex(buff, 0);
15511551
php_error_docref(NULL, E_WARNING,"Cannot allocate GD IO context");
15521552
goto out_err;
15531553
}
@@ -1558,8 +1558,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15581558
im = (*ioctx_func_p)(io_ctx);
15591559
}
15601560
io_ctx->gd_free(io_ctx);
1561+
pefree(pstr, 1);
1562+
zend_string_release_ex(buff, 0);
15611563
}
1562-
/* try and force the stream to be FILE* */
15631564
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) {
15641565
/* try and force the stream to be FILE* */
15651566
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
@@ -620,17 +620,6 @@ static ZEND_FUNCTION(zend_test_fill_packed_array)
620620
} ZEND_HASH_FILL_END();
621621
}
622622

623-
static ZEND_FUNCTION(zend_test_has_c_copy_file_range)
624-
{
625-
ZEND_PARSE_PARAMETERS_NONE();
626-
627-
#ifdef HAVE_COPY_FILE_RANGE
628-
RETURN_TRUE;
629-
#else
630-
RETURN_FALSE;
631-
#endif
632-
}
633-
634623
static zend_object *zend_test_class_new(zend_class_entry *class_type)
635624
{
636625
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
@@ -203,8 +203,6 @@ function zend_test_fill_packed_array(array &$array): void {}
203203

204204
/** @return resource */
205205
function zend_test_create_throwing_resource() {}
206-
207-
function zend_test_has_c_copy_file_range(): bool {}
208206
}
209207

210208
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)