aboutsummaryrefslogtreecommitdiffstats
path: root/includes/parser/PPDPart_Hash.php
diff options
context:
space:
mode:
authorMáté Szabó <mszabo@fandom.com>2022-07-29 02:42:48 +0200
committerMáté Szabó <mszabo@fandom.com>2022-07-29 02:53:04 +0200
commit4641284f0db4c49143e866c71ede0c689ccc141d (patch)
treeac9e561ccb63f1f7471ca8e3ca28777e4a96c2ee /includes/parser/PPDPart_Hash.php
parent1e18bb3cf6b70cc4acfaf0cf0f382cba33901b11 (diff)
downloadmediawikicore-4641284f0db4c49143e866c71ede0c689ccc141d.tar.gz
mediawikicore-4641284f0db4c49143e866c71ede0c689ccc141d.zip
preprocessor: Add missing field declarations
PPDPart_Hash and PPDStackElement_Hash were both missing declarations for the startPos and eqpos fields, respectively, which raises an E_DEPRECATED on PHP 8.2 due to dynamic property creation being deprecated. As a fix, add explicit declarations for these fields. Bug: T314099 Change-Id: I59a7d86418d54c031d00a7cf717fa1b744b302e0
Diffstat (limited to 'includes/parser/PPDPart_Hash.php')
-rw-r--r--includes/parser/PPDPart_Hash.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/includes/parser/PPDPart_Hash.php b/includes/parser/PPDPart_Hash.php
index 851a179fedef..9a36dc554066 100644
--- a/includes/parser/PPDPart_Hash.php
+++ b/includes/parser/PPDPart_Hash.php
@@ -21,11 +21,6 @@
/**
* @ingroup Parser
- *
- * @property int $eqpos
- * @property int $commentEnd
- * @property int $visualEnd
- * @property string[] $out
*/
// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPDPart_Hash {
@@ -34,6 +29,21 @@ class PPDPart_Hash {
*/
public $out;
+ /**
+ * @var int|null Index of equals sign, if found
+ */
+ public $eqpos;
+
+ /**
+ * @var int|null
+ */
+ public $commentEnd;
+
+ /**
+ * @var int|null
+ */
+ public $visualEnd;
+
public function __construct( $out = '' ) {
$this->out = [];