Page MenuHomePhabricator

PHP5 fatal error in Skin.php with $wgUseCategoryBrowser
Closed, ResolvedPublic

Description

Author: Michael.Keppler

Description:
"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.


Version: unspecified
Severity: blocker

Details

Reference
bz2673

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:38 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz2673.
bzimport added a subscriber: Unknown Object (MLST).

Confirmed with CVS HEAD on PHP 5.0.4 when $wgUseCategoryBrowser = true;

soltansa wrote:

<?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.comhttp://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 $
################

\*======================================================================*/
?>

robchur wrote:

(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.

Michael.Keppler wrote:

The URL was also changed, so maybe this is just a kind of link spam...