1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
diff -aruN a/XML/Parser.php b/XML/Parser.php
--- a/XML/Parser.php 2022-01-10 11:32:08.624378884 -0500
+++ b/XML/Parser.php 2022-01-10 11:47:09.581396869 -0500
@@ -651,12 +651,12 @@
*
* @param mixed $xp ??
* @param mixed $elem ??
- * @param mixed &$attribs ??
+ * @param mixed $attribs ??
*
* @return null
* @abstract
*/
- function startHandler($xp, $elem, &$attribs)
+ function startHandler($xp, $elem, $attribs)
{
return null;
}
diff -aruN a/tests/001.phpt b/tests/001.phpt
--- a/tests/001.phpt 2019-04-10 14:18:52.000000000 -0400
+++ b/tests/001.phpt 2022-01-10 11:46:50.341458673 -0500
@@ -13,10 +13,10 @@
require_once "XML/Parser.php";
class __TestParser1 extends XML_Parser {
- function startHandler($xp, $element, &$attribs) {
+ function startHandler($xp, $element, $attribs) {
print "<$element";
reset($attribs);
- while (list($key, $val) = each($attribs)) {
+ foreach ($attribs as $key => $val) {
$enc = htmlentities($val);
print " $key=\"$enc\"";
}
diff -aruN /tests/002.phpt /tests/002.phpt
--- a/tests/002.phpt 2019-04-10 14:18:52.000000000 -0400
+++ b/tests/002.phpt 2022-01-10 11:46:58.281433169 -0500
@@ -13,10 +13,10 @@
require_once "XML/Parser.php";
class __TestParser2 extends XML_Parser {
- function startHandler($xp, $element, &$attribs) {
+ function startHandler($xp, $element, $attribs) {
print "<$element";
reset($attribs);
- while (list($key, $val) = each($attribs)) {
+ foreach ($attribs as $key => $val) {
$enc = htmlentities($val);
print " $key=\"$enc\"";
}
diff -aruN /tests/003.phpt /tests/003.phpt
--- a/tests/003.phpt 2019-04-10 14:18:52.000000000 -0400
+++ b/tests/003.phpt 2022-01-10 11:41:03.402573127 -0500
@@ -13,10 +13,10 @@
require_once "XML/Parser.php";
class __TestParser3 extends XML_Parser {
- function startHandler($xp, $element, &$attribs) {
+ function startHandler($xp, $element, $attribs) {
print "<$element";
reset($attribs);
- while (list($key, $val) = each($attribs)) {
+ foreach ($attribs as $key => $val) {
$enc = htmlentities($val);
print " $key=\"$enc\"";
}
|