jenkins-bot has submitted this change and it was merged.

Change subject: Added check for null $title to getDefaultForm()
......................................................................


Added check for null $title to getDefaultForm()

Change-Id: Ie19de0c3e59f91a7c7926b496b6a70cd065306c6
---
M includes/SF_FormLinker.php
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/SF_FormLinker.php b/includes/SF_FormLinker.php
index 0e8b5db..6abe511 100644
--- a/includes/SF_FormLinker.php
+++ b/includes/SF_FormLinker.php
@@ -22,6 +22,15 @@
        static $mLinkedPagesRetrieved = false;
 
        static function getDefaultForm( $title ) {
+               // The title passed in can be null in at least one
+               // situation: if the "namespace page" is being checked, and
+               // the project namespace alias contains any non-ASCII
+               // characters. There may be other cases too.
+               // If that happens, just exit.
+               if ( is_null( $title ) ) {
+                       return null;
+               }
+
                $pageID = $title->getArticleID();
                $dbr = wfGetDB( DB_SLAVE );
                $res = $dbr->select( 'page_props',

-- 
To view, visit https://gerrit.wikimedia.org/r/238664
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie19de0c3e59f91a7c7926b496b6a70cd065306c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to