[PRES] [web-pres2] master: Fixed PHP-4ism where it was common (but still wrong) to pass arrays by reference

[email protected] (Derick Rethans) Thu, 29 May 2025 13:29:48 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Author: Derick Rethans (derickr)
Date: 2025-05-29T14:18:00+01:00

Commit: https://github.com/php/web-pres2/commit/0e2b88d212b875a654e81ff6dde7afe85cafab4d
Raw diff: https://github.com/php/web-pres2/commit/0e2b88d212b875a654e81ff6dde7afe85cafab4d.diff

Fixed PHP-4ism where it was common (but still wrong) to pass arrays by reference

Changed paths:
  M  XML_Presentation.php
  M  XML_Slide.php


Diff:

diff --git a/XML_Presentation.php b/XML_Presentation.php
index 5115192..4f9cd54 100644
--- a/XML_Presentation.php
+++ b/XML_Presentation.php
@@ -106,7 +106,7 @@ function __construct($handle = '')
      * @param  array  Attributes of XML tag
      * @return void
      */
-    function startHandler($parser, $element, &$attribs)
+    function startHandler($parser, $element, $attribs)
     {
         switch ($element) {
             /* These tags can have other tags inside */
diff --git a/XML_Slide.php b/XML_Slide.php
index 70612a1..5db6eff 100644
--- a/XML_Slide.php
+++ b/XML_Slide.php
@@ -98,7 +98,7 @@ function __construct($handle = '')
      * @param  array  Attributes of XML tag
      * @return void
      */
-    function startHandler($parser, $element, &$attribs)
+    function startHandler($parser, $element, $attribs)
     {
         switch ($element) {
             /* These tags can have other tags inside */