Last modified: 2013-09-23 17:59:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42542, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40542 - Passing constant via reference in Title.php
Passing constant via reference in Title.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
Other Linux
: Low normal (vote)
: 1.21.x release
Assigned To: Sam Reed (reedy)
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2012-09-27 08:51 UTC by James Michael DuPont
Modified: 2013-09-23 17:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Michael DuPont 2012-09-27 08:51:58 UTC
cascade was passed as a constant, but it is expected to be a reference.
includes/Title.php line 2267	

Untested  Patch :
@@ -2263,7 +2263,8 @@ public function updateTitleProtection( $create_perm, $reason, $expiry ) {
     $expiry = array( 'create' => $expiry );
     $page = WikiPage::factory( $this );
-    $status = $page->doUpdateRestrictions( $limit, $expiry, false, $reason, $wgUser );
+    $cascade=false;// passed by reference to doUpdateRestrictions, dont pass constants
+    $status = $page->doUpdateRestrictions( $limit, $expiry, $cascade, $reason, $wgUser );
     return $status->isOK();

   }
also here :
https://github.com/h4ck3rm1k3/mediawiki/commit/5cd7bccdb53389c8da58738924f10f9dc9465cb9
Comment 1 Kevin Israel (PleaseStand) 2013-09-23 17:59:14 UTC
This was fixed in c01e1c161348edc897dfb5219ceb849649ce8191.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links