Yaron Koren has submitted this change and it was merged.
Change subject: Fix for blank value passed to SFFormUtils::unhandledFieldsHTML()
......................................................................
Fix for blank value passed to SFFormUtils::unhandledFieldsHTML()
Change-Id: I29fdbb58129bab2cefe0a6ad1bfe2f37e22db767
---
M includes/SF_FormUtils.php
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Yaron Koren: Checked; Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/SF_FormUtils.php b/includes/SF_FormUtils.php
index 8dc6a17..54f4c34 100644
--- a/includes/SF_FormUtils.php
+++ b/includes/SF_FormUtils.php
@@ -17,6 +17,13 @@
* not handled by the form itself
*/
static function unhandledFieldsHTML( $template_in_form ) {
+ // This shouldn't happen, but sometimes this value is null.
+ // @TODO - fix the code that calls this function so the
+ // value is never null.
+ if ( is_null( $template_in_form ) ) {
+ return '';
+ }
+
// HTML element names shouldn't contain spaces
$templateName = str_replace( ' ', '_',
$template_in_form->getTemplateName() );
$text = "";
--
To view, visit https://gerrit.wikimedia.org/r/298317
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I29fdbb58129bab2cefe0a6ad1bfe2f37e22db767
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits