From 033c69cfabcbed874ecefbb9207eb9ce3743eeec Mon Sep 17 00:00:00 2001 From: Reedy Date: Sat, 25 Feb 2023 00:57:56 +0000 Subject: [PATCH] ScribuntoException: Use value property not dynamic property Bug: T330524 Change-Id: I69a102497fffb939c849d2836302068ac9eff3d0 --- includes/Hooks.php | 6 +++--- includes/ScribuntoException.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 6e40c2a0..89b6cca3 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -393,9 +393,9 @@ class Hooks { $status->merge( $validateStatus ); - if ( isset( $validateStatus->scribunto_error->params['module'] ) ) { - $module = $validateStatus->scribunto_error->params['module']; - $line = $validateStatus->scribunto_error->params['line']; + if ( isset( $validateStatus->value->params['module'] ) ) { + $module = $validateStatus->value->params['module']; + $line = $validateStatus->value->params['line']; if ( $module === $title->getPrefixedDBkey() && preg_match( '/^\d+$/', $line ) ) { $out = $context->getOutput(); $out->addInlineScript( 'window.location.hash = ' . Xml::encodeJsVar( "#mw-ce-l$line" ) ); diff --git a/includes/ScribuntoException.php b/includes/ScribuntoException.php index 042af5c8..b4b2ae77 100644 --- a/includes/ScribuntoException.php +++ b/includes/ScribuntoException.php @@ -67,7 +67,7 @@ class ScribuntoException extends MWException { public function toStatus() { $status = Status::newFatal( $this->messageName, ...$this->messageArgs ); - $status->scribunto_error = $this; + $status->value = $this; return $status; }