Loading...
 
Skip to main content

WSOD after insert of Wiki Page

Status
Closed
Subject
WSOD after insert of Wiki Page
Version
9.x
Category
  • Error
  • Less than 30-minutes fix
Feature
Wiki (page view, edit, history, rename, etc)
Resolution status
Out of Date
Submitted by
zulyzami
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

When saving a new Wiki page, you get a white Screen of Death.

PHP Fatal error: Call-time pass-by-reference has been removed in ... on line 97

In PHP version 5.4 >



There is no reference sign on a function call - only on function definitions. Function definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will get a warning saying that "call-time pass-by-reference" is deprecated when you use & in foo(&$a);.

For example, use:

// Right way!
function myFunc(&$arg) { }
myFunc($var);

Rather than:

// Wrong way!
function myFunc($arg) { }
myFunc(&$arg);

Solution

Remove the & from line 97 in:

lib\core\Reports\Manager.php

public function addToCache(&$watches, $data)
{
$users = $this->reportsUsers->getAllUsers();
$this->reportsCache->add($watches, $data, $users);
}

Workaround
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4283
Created
Monday 27 August, 2012 15:26:57 UTC
by zulyzami
LastModif
Monday 26 May, 2025 08:01:03 UTC


Show PHP error messages