jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388388 )
Change subject: ApiQueryContentTranslation: Fix php warnings ...................................................................... ApiQueryContentTranslation: Fix php warnings Fixes the following 2 warnings observed in production: Notice: Undefined property: ApiQueryContentTranslation::$user in /srv/mediawiki/php-1.31.0-wmf.6/extensions/ContentTranslation/api/ ApiQueryContentTranslation.php on line 120 Notice: Undefined variable: translation in /srv/mediawiki/php-1.31.0-wmf.6/ extensions/ContentTranslation/api/ApiQueryContentTranslation.php on line 126 Change-Id: If3871eb0d5ff5fedbaef3f20edff7fa1ccd808db --- M api/ApiQueryContentTranslation.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Nikerabbit: Looks good to me, approved diff --git a/api/ApiQueryContentTranslation.php b/api/ApiQueryContentTranslation.php index ea16f03..5b91733 100644 --- a/api/ApiQueryContentTranslation.php +++ b/api/ApiQueryContentTranslation.php @@ -116,8 +116,9 @@ * @param Translator $translator */ public function find( TranslationWork $work, Translator $translator ) { + $translation = null; $result = $this->getResult(); - if ( $this->user ) { + if ( isset( $this->user ) ) { $translation = Translation::findForTranslator( $work, $translator ); } // Check for other drafts. If one exists, return that to the UI which will then -- To view, visit https://gerrit.wikimedia.org/r/388388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3871eb0d5ff5fedbaef3f20edff7fa1ccd808db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: Catrope <r...@wikimedia.org> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits