Last modified: 2006-02-16 19:31:17 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 T4673, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2673 - PHP5 fatal error in Skin.php with $wgUseCategoryBrowser
PHP5 fatal error in Skin.php with $wgUseCategoryBrowser
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: High blocker (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-02 20:55 UTC by Michael Keppler
Modified: 2006-02-16 19:31 UTC (History)
0 users

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


Attachments

Description Michael Keppler 2005-07-02 20:55:02 UTC
"Fatal error: Non-static method Skin::walkThrough() cannot be called statically
in C:\programme\xampp\xampp\htdocs\mediawikicvs\includes\Skin.php on line 455"
for current CVS code under PHP 5.0.4

with PHP 4.3.10 I get another error "can't redeclare function" for the same
piece of code.

Problem seems to be nested function declaration.
Comment 1 Brion Vibber 2005-07-02 21:52:21 UTC
Confirmed with CVS HEAD on PHP 5.0.4 when $wgUseCategoryBrowser = true;
Comment 2 yahya sanyor 2005-12-26 08:47:12 UTC
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.8 - Licence Number 
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2005 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

error_reporting(E_ALL & ~E_NOTICE);

if (!is_object($DB_site))
{
	exit;
}

// all these stats are for that day
$timestamp = TIMENOW - 3600 * 23;
// note: we only subtract 23 hours from the current time to account for Spring 
DST. Bug id 2673.

$month = date('n', $timestamp);
$day = date('j', $timestamp);
$year = date('Y', $timestamp);

$timestamp = mktime(0, 0, 0, $month, $day, $year);
// new users
$newusers = $DB_site->query_first("SELECT COUNT(userid) AS total FROM " . 
TABLE_PREFIX . "user WHERE joindate >= " . $timestamp);
$newusers['total'] = intval($newusers['total']);

// new threads
$newthreads = $DB_site->query_first("SELECT COUNT(threadid) AS total FROM " . 
TABLE_PREFIX . "thread WHERE dateline >= " . $timestamp);
$newthreads['total'] = intval($newthreads['total']);

// new posts
$newposts = $DB_site->query_first("SELECT COUNT(threadid) AS total FROM " . 
TABLE_PREFIX . "post WHERE dateline >= " . $timestamp);
$newposts['total'] = intval($newposts['total']);

// active users
$activeusers = $DB_site->query_first("SELECT COUNT(userid) AS total FROM " . 
TABLE_PREFIX . "user WHERE lastactivity >= " . $timestamp);
$activeusers['total'] = intval($activeusers['total']);

$DB_site->query("
	INSERT IGNORE INTO " . TABLE_PREFIX . "stats
		(dateline, nuser, nthread, npost, ausers)
	VALUES
		($timestamp, $newusers[total], $newthreads[total], $newposts
[total], $activeusers[total])
");

log_cron_action('Statistics Saved', $nextitem);

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 20:46, Thu Jul 28th 2005
|| # CVS: $RCSfile: stats.php,v $ - $Revision: 1.12 $
|| ####################################################################
\*======================================================================*/
?>
Comment 3 Rob Church 2006-02-16 11:14:11 UTC
(In reply to comment #2)

How's this relevant to the bug report? And please be aware that copy-pasting
chunks of non-free code about the place is a no-no. Thanks.
Comment 4 Michael Keppler 2006-02-16 19:31:17 UTC
The URL was also changed, so maybe this is just a kind of link spam...

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


Navigation
Links