Index: trunk/phase3/includes/BagOStuff.php |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | * @param string $serial |
361 | 361 | * @return mixed |
362 | 362 | */ |
363 | | - function &_unserialize( $serial ) { |
| 363 | + function _unserialize( $serial ) { |
364 | 364 | if( function_exists( 'gzinflate' ) ) { |
365 | 365 | $decomp = @gzinflate( $serial ); |
366 | 366 | if( false !== $decomp ) { |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -487,10 +487,11 @@ |
488 | 488 | */ |
489 | 489 | function &getDB() { |
490 | 490 | #if ( $this->mForUpdate ) { |
491 | | - return wfGetDB( DB_MASTER ); |
| 491 | + $ret =& wfGetDB( DB_MASTER ); |
492 | 492 | #} else { |
493 | | - # return wfGetDB( DB_SLAVE ); |
| 493 | + # $ret =& wfGetDB( DB_SLAVE ); |
494 | 494 | #} |
| 495 | + return $ret; |
495 | 496 | } |
496 | 497 | |
497 | 498 | /** |
Index: trunk/phase3/includes/ObjectCache.php |
— | — | @@ -107,17 +107,20 @@ |
108 | 108 | |
109 | 109 | function &wfGetMainCache() { |
110 | 110 | global $wgMainCacheType; |
111 | | - return wfGetCache( $wgMainCacheType ); |
| 111 | + $ret =& wfGetCache( $wgMainCacheType ); |
| 112 | + return $ret; |
112 | 113 | } |
113 | 114 | |
114 | 115 | function &wfGetMessageCacheStorage() { |
115 | 116 | global $wgMessageCacheType; |
116 | | - return wfGetCache( $wgMessageCacheType ); |
| 117 | + $ret =& wfGetCache( $wgMessageCacheType ); |
| 118 | + return $ret; |
117 | 119 | } |
118 | 120 | |
119 | | -function wfGetParserCacheStorage() { |
| 121 | +function &wfGetParserCacheStorage() { |
120 | 122 | global $wgParserCacheType; |
121 | | - return wfGetCache( $wgParserCacheType ); |
| 123 | + $ret =& wfGetCache( $wgParserCacheType ); |
| 124 | + return $ret; |
122 | 125 | } |
123 | 126 | |
124 | 127 | ?> |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | /** |
132 | 132 | * Pass a title object, not a title string |
133 | 133 | */ |
134 | | - function makeLinkObj( &$nt, $text= '', $query = '', $trail = '', $prefix = '' ) { |
| 134 | + function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) { |
135 | 135 | global $wgOut, $wgUser; |
136 | 136 | $fname = 'Linker::makeLinkObj'; |
137 | 137 | wfProfileIn( $fname ); |
— | — | @@ -368,7 +368,7 @@ |
369 | 369 | } |
370 | 370 | |
371 | 371 | /** @todo document */ |
372 | | - function makeImageLinkObj( &$nt, $label, $alt, $align = '', $width = false, $height = false, $framed = false, |
| 372 | + function makeImageLinkObj( $nt, $label, $alt, $align = '', $width = false, $height = false, $framed = false, |
373 | 373 | $thumb = false, $manual_thumb = '' ) |
374 | 374 | { |
375 | 375 | global $wgContLang, $wgUser, $wgThumbLimits; |
— | — | @@ -546,7 +546,7 @@ |
547 | 547 | /** |
548 | 548 | * Pass a title object, not a title string |
549 | 549 | */ |
550 | | - function makeBrokenImageLinkObj( &$nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 550 | + function makeBrokenImageLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
551 | 551 | # Fail gracefully |
552 | 552 | if ( ! isset($nt) ) { |
553 | 553 | # wfDebugDieBacktrace(); |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3373,7 +3373,7 @@ |
3374 | 3374 | function getUseDynamicDates() { return $this->mUseDynamicDates; } |
3375 | 3375 | function getInterwikiMagic() { return $this->mInterwikiMagic; } |
3376 | 3376 | function getAllowExternalImages() { return $this->mAllowExternalImages; } |
3377 | | - function getSkin() { return $this->mSkin; } |
| 3377 | + function &getSkin() { return $this->mSkin; } |
3378 | 3378 | function getDateFormat() { return $this->mDateFormat; } |
3379 | 3379 | function getEditSection() { return $this->mEditSection; } |
3380 | 3380 | function getNumberHeadings() { return $this->mNumberHeadings; } |
Index: trunk/phase3/includes/DatabaseFunctions.php |
— | — | @@ -49,7 +49,8 @@ |
50 | 50 | */ |
51 | 51 | function &wfGetDB( $db = DB_LAST, $groups = array() ) { |
52 | 52 | global $wgLoadBalancer; |
53 | | - return $wgLoadBalancer->getConnection( $db, true, $groups ); |
| 53 | + $ret =& $wgLoadBalancer->getConnection( $db, true, $groups ); |
| 54 | + return $ret; |
54 | 55 | } |
55 | 56 | |
56 | 57 | /** |
Index: trunk/phase3/includes/SearchUpdate.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | wfProfileIn( $fname ); |
40 | 40 | |
41 | 41 | require_once( 'SearchEngine.php' ); |
42 | | - $search =& SearchEngine::create(); |
| 42 | + $search = SearchEngine::create(); |
43 | 43 | $lc = $search->legalSearchChars() . '&#;'; |
44 | 44 | |
45 | 45 | if( $this->mText === false ) { |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | * @static |
23 | 23 | * @access public |
24 | 24 | */ |
25 | | - function &newFromId( $id ) { |
| 25 | + function newFromId( $id ) { |
26 | 26 | return Revision::newFromConds( |
27 | 27 | array( 'page_id=rev_page', |
28 | 28 | 'rev_id' => IntVal( $id ) ) ); |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | * @access public |
40 | 40 | * @static |
41 | 41 | */ |
42 | | - function &newFromTitle( &$title, $id = 0 ) { |
| 42 | + function newFromTitle( &$title, $id = 0 ) { |
43 | 43 | if( $id ) { |
44 | 44 | $matchId = IntVal( $id ); |
45 | 45 | } else { |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | * @return Revision |
64 | 64 | * @access public |
65 | 65 | */ |
66 | | - function &loadFromPageId( &$db, $pageid, $id = 0 ) { |
| 66 | + function loadFromPageId( &$db, $pageid, $id = 0 ) { |
67 | 67 | if( $id ) { |
68 | 68 | $matchId = IntVal( $id ); |
69 | 69 | } else { |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | * @return Revision |
88 | 88 | * @access public |
89 | 89 | */ |
90 | | - function &loadFromTitle( &$db, $title, $id = 0 ) { |
| 90 | + function loadFromTitle( &$db, $title, $id = 0 ) { |
91 | 91 | if( $id ) { |
92 | 92 | $matchId = IntVal( $id ); |
93 | 93 | } else { |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | * @access public |
114 | 114 | * @static |
115 | 115 | */ |
116 | | - function &loadFromTimestamp( &$db, &$title, $timestamp ) { |
| 116 | + function loadFromTimestamp( &$db, &$title, $timestamp ) { |
117 | 117 | return Revision::loadFromConds( |
118 | 118 | $db, |
119 | 119 | array( 'rev_timestamp' => $db->timestamp( $timestamp ), |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | * @static |
131 | 131 | * @access private |
132 | 132 | */ |
133 | | - function &newFromConds( $conditions ) { |
| 133 | + function newFromConds( $conditions ) { |
134 | 134 | $db =& wfGetDB( DB_SLAVE ); |
135 | 135 | $row = Revision::loadFromConds( $db, $conditions ); |
136 | 136 | if( is_null( $row ) ) { |
— | — | @@ -149,8 +149,8 @@ |
150 | 150 | * @static |
151 | 151 | * @access private |
152 | 152 | */ |
153 | | - function &loadFromConds( &$db, $conditions ) { |
154 | | - $res =& Revision::fetchFromConds( $db, $conditions ); |
| 153 | + function loadFromConds( &$db, $conditions ) { |
| 154 | + $res = Revision::fetchFromConds( $db, $conditions ); |
155 | 155 | if( $res ) { |
156 | 156 | $row = $res->fetchObject(); |
157 | 157 | $res->free(); |
— | — | @@ -171,7 +171,7 @@ |
172 | 172 | * @static |
173 | 173 | * @access public |
174 | 174 | */ |
175 | | - function &fetchAllRevisions( &$title ) { |
| 175 | + function fetchAllRevisions( &$title ) { |
176 | 176 | return Revision::fetchFromConds( |
177 | 177 | wfGetDB( DB_SLAVE ), |
178 | 178 | array( 'page_namespace' => $title->getNamespace(), |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | * @static |
191 | 191 | * @access public |
192 | 192 | */ |
193 | | - function &fetchRevision( &$title ) { |
| 193 | + function fetchRevision( &$title ) { |
194 | 194 | return Revision::fetchFromConds( |
195 | 195 | wfGetDB( DB_SLAVE ), |
196 | 196 | array( 'rev_id=page_latest', |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | * @static |
211 | 211 | * @access private |
212 | 212 | */ |
213 | | - function &fetchFromConds( &$db, $conditions ) { |
| 213 | + function fetchFromConds( &$db, $conditions ) { |
214 | 214 | $res = $db->select( |
215 | 215 | array( 'page', 'revision' ), |
216 | 216 | array( 'page_namespace', |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | * Returns the title of the page associated with this entry. |
303 | 303 | * @return Title |
304 | 304 | */ |
305 | | - function &getTitle() { |
| 305 | + function getTitle() { |
306 | 306 | if( isset( $this->mTitle ) ) { |
307 | 307 | return $this->mTitle; |
308 | 308 | } |
— | — | @@ -313,7 +313,7 @@ |
314 | 314 | 'rev_id' => $this->mId ), |
315 | 315 | 'Revision::getTItle' ); |
316 | 316 | if( $row ) { |
317 | | - $this->mTitle =& Title::makeTitle( $row->page_namespace, |
| 317 | + $this->mTitle = Title::makeTitle( $row->page_namespace, |
318 | 318 | $row->page_title ); |
319 | 319 | } |
320 | 320 | return $this->mTitle; |
— | — | @@ -389,7 +389,7 @@ |
390 | 390 | /** |
391 | 391 | * @return Revision |
392 | 392 | */ |
393 | | - function &getPrevious() { |
| 393 | + function getPrevious() { |
394 | 394 | $prev = $this->mTitle->getPreviousRevisionID( $this->mId ); |
395 | 395 | return Revision::newFromTitle( $this->mTitle, $prev ); |
396 | 396 | } |
— | — | @@ -397,7 +397,7 @@ |
398 | 398 | /** |
399 | 399 | * @return Revision |
400 | 400 | */ |
401 | | - function &getNext() { |
| 401 | + function getNext() { |
402 | 402 | $next = $this->mTitle->getNextRevisionID( $this->mId ); |
403 | 403 | return Revision::newFromTitle( $this->mTitle, $next ); |
404 | 404 | } |
— | — | @@ -601,7 +601,7 @@ |
602 | 602 | * @param bool $minor |
603 | 603 | * @return Revision |
604 | 604 | */ |
605 | | - function &newNullRevision( &$dbw, $pageId, $summary, $minor ) { |
| 605 | + function newNullRevision( &$dbw, $pageId, $summary, $minor ) { |
606 | 606 | $fname = 'Revision::newNullRevision'; |
607 | 607 | wfProfileIn( $fname ); |
608 | 608 | |
Index: trunk/phase3/includes/DifferenceEngine.php |
— | — | @@ -309,9 +309,9 @@ |
310 | 310 | |
311 | 311 | $dbr =& wfGetDB( DB_SLAVE ); |
312 | 312 | if( $this->mNewid ) { |
313 | | - $this->newRev =& Revision::newFromId( $this->mNewid ); |
| 313 | + $this->newRev = Revision::newFromId( $this->mNewid ); |
314 | 314 | } else { |
315 | | - $this->newRev =& Revision::newFromTitle( $wgTitle ); |
| 315 | + $this->newRev = Revision::newFromTitle( $wgTitle ); |
316 | 316 | } |
317 | 317 | if( is_null( $this->newRev ) ) { |
318 | 318 | return false; |
— | — | @@ -332,9 +332,9 @@ |
333 | 333 | } |
334 | 334 | |
335 | 335 | if( $this->mOldid ) { |
336 | | - $this->oldRev =& Revision::newFromId( $this->mOldid ); |
| 336 | + $this->oldRev = Revision::newFromId( $this->mOldid ); |
337 | 337 | } else { |
338 | | - $this->oldRev =& $this->newRev->getPrevious(); |
| 338 | + $this->oldRev = $this->newRev->getPrevious(); |
339 | 339 | $this->mOldid = $this->oldRev->getId(); |
340 | 340 | } |
341 | 341 | if( is_null( $this->oldRev ) ) { |
Index: trunk/phase3/includes/Namespace.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | /** |
102 | 102 | * Returns the canonical (English Wikipedia) name for a given index |
103 | 103 | */ |
104 | | - function &getCanonicalName( $index ) { |
| 104 | + function getCanonicalName( $index ) { |
105 | 105 | global $wgCanonicalNamespaceNames; |
106 | 106 | return $wgCanonicalNamespaceNames[$index]; |
107 | 107 | } |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | * Returns the index for a given canonical name, or NULL |
111 | 111 | * The input *must* be converted to lower case first |
112 | 112 | */ |
113 | | - function &getCanonicalIndex( $name ) { |
| 113 | + function getCanonicalIndex( $name ) { |
114 | 114 | global $wgCanonicalNamespaceNames; |
115 | 115 | static $xNamespaces = false; |
116 | 116 | if ( $xNamespaces === false ) { |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | * @return object |
134 | 134 | * @access private |
135 | 135 | */ |
136 | | - function &setupTemplate( $classname, $repository=false, $cache_dir=false ) { |
| 136 | + function setupTemplate( $classname, $repository=false, $cache_dir=false ) { |
137 | 137 | return new $classname(); |
138 | 138 | } |
139 | 139 | |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | $this->mTitle =& $wgTitle; |
163 | 163 | $this->mUser =& $wgUser; |
164 | 164 | |
165 | | - $tpl =& $this->setupTemplate( $this->template, 'skins' ); |
| 165 | + $tpl = $this->setupTemplate( $this->template, 'skins' ); |
166 | 166 | |
167 | 167 | #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText |
168 | 168 | $tpl->setTranslator(new MediaWiki_I18N()); |
— | — | @@ -483,7 +483,7 @@ |
484 | 484 | } |
485 | 485 | |
486 | 486 | |
487 | | - function tabAction( &$title, $message, $selected, $query='', $checkEdit=false ) { |
| 487 | + function tabAction( $title, $message, $selected, $query='', $checkEdit=false ) { |
488 | 488 | $classes = array(); |
489 | 489 | if( $selected ) { |
490 | 490 | $classes[] = 'selected'; |
Index: trunk/phase3/includes/Database.php |
— | — | @@ -937,6 +937,9 @@ |
938 | 938 | * @return string |
939 | 939 | */ |
940 | 940 | function makeUpdateOptions( $options ) { |
| 941 | + if( !is_array( $options ) ) { |
| 942 | + wfDebugDieBacktrace( 'makeUpdateOptions given non-array' ); |
| 943 | + } |
941 | 944 | $opts = array(); |
942 | 945 | if ( in_array( 'LOW_PRIORITY', $options ) ) |
943 | 946 | $opts[] = $this->lowPriorityOption(); |
— | — | @@ -1453,7 +1456,7 @@ |
1454 | 1457 | /** |
1455 | 1458 | * @todo document |
1456 | 1459 | */ |
1457 | | - function &resultObject( &$result ) { |
| 1460 | + function resultObject( &$result ) { |
1458 | 1461 | if( empty( $result ) ) { |
1459 | 1462 | return NULL; |
1460 | 1463 | } else { |
— | — | @@ -1565,7 +1568,7 @@ |
1566 | 1569 | /** |
1567 | 1570 | * @todo document |
1568 | 1571 | */ |
1569 | | - function &fetchObject() { |
| 1572 | + function fetchObject() { |
1570 | 1573 | return $this->db->fetchObject( $this->result ); |
1571 | 1574 | } |
1572 | 1575 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -587,6 +587,10 @@ |
588 | 588 | * Specify USE INDEX on Allpages chunk queries, sometimes gets lost |
589 | 589 | due to bogus optimization |
590 | 590 | * (bug 275) Section duplication fix |
| 591 | +* Remove unused use of undefined variable in UserMailer |
| 592 | +* Fix notice on search index update due to non-array |
| 593 | +* (bug 2885) Fix fatal errors and notices in PHP 5.1.0beta3 |
| 594 | +* (bug 2931) Fix additional notices on reference use in PHP 4.4.0 |
591 | 595 | |
592 | 596 | |
593 | 597 | === Caveats === |