mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
ScribuntoException: Use value property not dynamic property
Bug: T330524 Change-Id: I69a102497fffb939c849d2836302068ac9eff3d0
This commit is contained in:
parent
2ffa6cf4a6
commit
033c69cfab
|
@ -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" ) );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue