Skip to content

Commit 0a12b3e

Browse files
authored
Remove param argument from php_verror (#22865)
* Remove param argument from php_verror Now that docref has been knocked out and error_include_args exists, remove this argument. Callers will be updated accordingly. * Remove param from exif * Remove param from snmp (no changes for tests needed) * Remove param from gd (no changes for tests needed) * Remove param from openssl * Document param change to php_verror
1 parent 1f4a88c commit 0a12b3e

30 files changed

Lines changed: 83 additions & 84 deletions

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
114114
longer is a pointer, but a directly embedded HashTable struct.
115115
. Extended php_stream_filter_ops with seek method.
116116
. zend_argument_error_variadic() now takes a new 'function' parameter.
117+
. The param argument in the php_verror() function has been removed.
117118

118119
- Added:
119120
. New zend_class_entry.ce_flags2 and zend_function.fn_flags2 fields were

ext/exif/exif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,11 +2036,11 @@ static void exif_error_docref(const char *docref EXIFERR_DC, image_info_type *Im
20362036
char *buf;
20372037

20382038
spprintf(&buf, 0, "%s(%ld): %s", _file, _line, format);
2039-
php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, buf, args);
2039+
php_verror(docref, type, buf, args);
20402040
efree(buf);
20412041
}
20422042
#else
2043-
php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, format, args);
2043+
php_verror(docref, type, format, args);
20442044
#endif
20452045
va_end(args);
20462046
}

ext/exif/tests/bug48378.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ __DIR__ . "/bug48378.jpg",
1010
);
1111
?>
1212
--EXPECTF--
13-
Warning: exif_read_data(%s): Invalid IFD start in %s48378.php on line %d
13+
Warning: exif_read_data(): Invalid IFD start in %s48378.php on line %d
1414

15-
Warning: exif_read_data(%s): Error reading from file: got=x08B4(=2228) != itemlen-2=x1FFE(=8190) in %s48378.php on line %d
15+
Warning: exif_read_data(): Error reading from file: got=x08B4(=2228) != itemlen-2=x1FFE(=8190) in %s48378.php on line %d
1616

17-
Warning: exif_read_data(%s): Invalid JPEG file in %s48378.php on line %d
17+
Warning: exif_read_data(): Invalid JPEG file in %s48378.php on line %d

ext/exif/tests/bug54002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ exif_read_data(__DIR__ . '/bug54002_2.jpg');
1111

1212
?>
1313
--EXPECTF--
14-
Warning: exif_read_data(bug54002_1.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
14+
Warning: exif_read_data(): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
1515

16-
Warning: exif_read_data(bug54002_2.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
16+
Warning: exif_read_data(): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d

ext/exif/tests/bug60150.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ $infile = __DIR__.'/bug60150.jpg';
1111
var_dump(exif_read_data($infile));
1212
?>
1313
--EXPECTF--
14-
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOriginal): Illegal pointer offset(%s) in %s on line %d
14+
Warning: exif_read_data(): Process tag(x9003=DateTimeOriginal): Illegal pointer offset(%s) in %s on line %d
1515

16-
Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
16+
Warning: exif_read_data(): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
1717

18-
Warning: exif_read_data(bug60150.jpg): Invalid JPEG file in %s on line %d
18+
Warning: exif_read_data(): Invalid JPEG file in %s on line %d
1919
bool(false)

ext/exif/tests/bug62523_3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Done
1111
--EXPECTF--
1212
Test
1313

14-
Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d
14+
Warning: exif_read_data(): File not supported in %sbug62523_3.php on line %d
1515
bool(false)
1616
Done

ext/exif/tests/bug68113-mb.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var_dump(exif_thumbnail(__DIR__."/bug68113私はガラスを食べられます.j
88
?>
99
Done
1010
--EXPECTF--
11-
Warning: exif_thumbnail(bug68113私はガラスを食べられます.jpg): File structure corrupted in %s%ebug68113-mb.php on line 2
11+
Warning: exif_thumbnail(): File structure corrupted in %s%ebug68113-mb.php on line 2
1212

13-
Warning: exif_thumbnail(bug68113私はガラスを食べられます.jpg): Invalid JPEG file in %s%ebug68113-mb.php on line 2
13+
Warning: exif_thumbnail(): Invalid JPEG file in %s%ebug68113-mb.php on line 2
1414
bool(false)
1515
Done

ext/exif/tests/bug68113.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var_dump(exif_thumbnail(__DIR__."/bug68113.jpg"));
88
?>
99
Done
1010
--EXPECTF--
11-
Warning: exif_thumbnail(bug68113.jpg): File structure corrupted in %s%ebug68113.php on line 2
11+
Warning: exif_thumbnail(): File structure corrupted in %s%ebug68113.php on line 2
1212

13-
Warning: exif_thumbnail(bug68113.jpg): Invalid JPEG file in %s%ebug68113.php on line 2
13+
Warning: exif_thumbnail(): Invalid JPEG file in %s%ebug68113.php on line 2
1414
bool(false)
1515
Done

ext/exif/tests/bug72094.phpt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,49 @@ print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
1111
?>
1212
DONE
1313
--EXPECTF--
14-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
14+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1515

16-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
16+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1717

18-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
18+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1919

20-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
20+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2121

22-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
22+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2323

24-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
24+
Warning: exif_read_data(): Process tag(x8298=Copyright): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2525

26-
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %sbug72094.php on line %d
26+
Warning: exif_read_data(): Illegal IFD offset in %sbug72094.php on line %d
2727

28-
Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s%ebug72094.php on line %d
28+
Warning: exif_read_data(): File structure corrupted in %s%ebug72094.php on line %d
2929

30-
Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
30+
Warning: exif_read_data(): Invalid JPEG file in %s%ebug72094.php on line %d
3131

32-
Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s%ebug72094.php on line %d
32+
Warning: exif_read_data(): Illegal IFD size in %s%ebug72094.php on line %d
3333

34-
Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug72094.php on line %d
34+
Warning: exif_read_data(): File structure corrupted in %s%ebug72094.php on line %d
3535

36-
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
36+
Warning: exif_read_data(): Invalid JPEG file in %s%ebug72094.php on line %d
3737

38-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
38+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
3939

40-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
40+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4141

42-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
42+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4343

44-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
44+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4545

46-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
46+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4747

48-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
48+
Warning: exif_read_data(): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4949

50-
Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s%ebug72094.php on line %d
50+
Warning: exif_read_data(): File structure corrupted in %s%ebug72094.php on line %d
5151

52-
Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
52+
Warning: exif_read_data(): Invalid JPEG file in %s%ebug72094.php on line %d
5353

54-
Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s%ebug72094.php on line %d
54+
Warning: exif_read_data(): Invalid TIFF start (1) in %s%ebug72094.php on line %d
5555

56-
Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s%ebug72094.php on line %d
56+
Warning: exif_read_data(): File structure corrupted in %s%ebug72094.php on line %d
5757

58-
Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
58+
Warning: exif_read_data(): Invalid JPEG file in %s%ebug72094.php on line %d
5959
DONE

ext/exif/tests/bug72603.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ exif
77
var_dump(count(exif_read_data(__DIR__ . "/bug72603.jpg")));
88
?>
99
--EXPECTF--
10-
Warning: exif_read_data(bug72603.jpg): %s in %s%ebug72603.php on line %d
10+
Warning: exif_read_data(): %s in %s%ebug72603.php on line %d
1111
int(%d)

0 commit comments

Comments
 (0)