1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/dba/tests/gh16390.phpt: skip if inifile is disabled

This test reads an ini "file" from a string, and expects a warning
about locking. But if inifile support is disabled, then you'll get

  Warning: dba_open(): Handler "inifile" is not available in
  /path/to/ext/dba/tests/gh16390.php on line 3

instead. We skip the test if inifile support is disabled.

Closes GH-17011.
This commit is contained in:
Michael Orlitzky
2024-12-01 10:36:38 -05:00
committed by Niels Dossche
parent ddbd396aa2
commit def271aaa7
2 changed files with 8 additions and 0 deletions

3
NEWS
View File

@@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.16
- DBA:
. Skip test if inifile is disabled. (orlitzky)
- Iconv:
. Fixed bug GH-17047 (UAF on iconv filter failure). (nielsdos)

View File

@@ -2,6 +2,11 @@
GH-16390 (dba_open() can segfault for "pathless" streams)
--EXTENSIONS--
dba
--SKIPIF--
<?php
require_once __DIR__ . '/setup/setup_dba_tests.inc';
check_skip('inifile');
?>
--FILE--
<?php
$file = 'data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata';