Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376447 )

Change subject: [WIP] WorkflowLoaderFactory: Don't crash for negative namespace 
titles
......................................................................

[WIP] WorkflowLoaderFactory: Don't crash for negative namespace titles

I can't test this locally because Vagrant isn't playing ball

Bug: T175085
Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
---
M includes/WorkflowLoaderFactory.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/47/376447/1

diff --git a/includes/WorkflowLoaderFactory.php 
b/includes/WorkflowLoaderFactory.php
index 47ea19c..921c172 100644
--- a/includes/WorkflowLoaderFactory.php
+++ b/includes/WorkflowLoaderFactory.php
@@ -71,7 +71,7 @@
                        if ( $pageTitle->getNamespace() === NS_TOPIC ) {
                                // topic page: workflow UUID is page title
                                $workflowId = self::uuidFromTitle( $pageTitle );
-                       } else {
+                       } else if ( $pageTitle->getNamespace() >= 0 ) {
                                // board page: workflow UUID is inside content 
model
                                $page = \WikiPage::factory( $pageTitle );
                                $content = $page->getContent();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d49f708c30f936ff01455e5e00ff50c9768001
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <r...@wikimedia.org>

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

Reply via email to