Last modified: 2010-05-15 15:38:24 UTC
After downloading 1.5.2 on 2005-11-17 and when going through upgrade from previous version, upgrade halted complaining that the wfGetDB function was not defined. After tracing the problem, found that wfGetDB was defined in includes/DatabaseFunctions.php on line 50 as function &wfGetDB( $db = DB_LAST, $groups = array() ) { ... } (notice the extra '&' before the function name) After removing this character, upgrade was successful.
That function is supposed to return a reference and changing it to not do so could result in some unexpected behaviour. What's your setup like?
bsd platform , mysql db host, all mediawiki defaults The call to the wfGetDB function on line 46 of maintenance/convertLinks.inc : $dbw =& wfGetDB( DB_MASTER ); is where the update halted the first time through. I'm not as familiar with the symantics of php, but I cannot find any documentation online describing a function definition requiring knowledge of a reference return-value in this manner. The reference in the assignment appears to make sense, but I can't make sense of an ampersand in the definition. Can you point me at some docs that describe what this does?
Go to www.php.net and look up 'references'.