Error log spammed with "expected to be a reference, value given" errors.

Started by Arnox, May 11, 2018, 03:08:21 PM

Previous topic - Next topic

Arnox

I thought I fixed this at first but nope.

It seems to be happening with pretty much every visit of every page anyone does. It's kind of infuriating and I don't know how to fix it and I'm almost sure it's covering up actual errors.

These are examples of the two errors that my log is complaining about:

2: Parameter 1 to PH_actions() expected to be a reference, value given
File: /srv/psa04/intosanctuary.com/httpdocs/Sources/Subs.php
Line: 4250

http://intosanctuary.com/index.php?topic=5447.msg69243
2: Parameter 1 to spoiler_buffer() expected to be a reference, value given

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox

Quote from: vbgamer45 on May 11, 2018, 03:14:01 PM
Have to remove the & from the lines that are referred.

I did so. There is no '&'.

4250: $results[$function] = call_user_func_array($call, $parameters);

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox

Quote from: vbgamer45 on May 11, 2018, 03:34:16 PM
You might have to find the exact call for  spoiler_buffer

Doing a search both in Subs.php and index.php for "spoiler" didn't turn up anything at all.

For the love of everything, please help me. I can't diagnose any mod errors or really any errors at all when it's spamming my log like this. :(

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox


vbgamer45

It's a different file. Since that mod uses hooks it would be in the sources file of that mod
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox

Quote from: vbgamer45 on May 11, 2018, 04:17:42 PM
It's a different file. Since that mod uses hooks it would be in the sources file of that mod

Should I check all the Subs files for "&$" and replace them with "$" or just the mod Subs files?

vbgamer45

No....it is case by case basis.

And this should be in the smf 2.0.x support forum as it is not SMF 2.1
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox

Quote from: vbgamer45 on May 11, 2018, 04:38:31 PM
No....it is case by case basis.

And this should be in the smf 2.0.x support forum as it is not SMF 2.1

Oh, sorry. ^^;

But how do I know which Subs file to edit if it keeps specifying the wrong one? (Subs.php) And how should I edit them?

vbgamer45

it's not that file....
You would need to hire a coder to figure it out.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arnox

Quote from: vbgamer45 on May 11, 2018, 05:16:18 PM
it's not that file....
You would need to hire a coder to figure it out.

Actually I FINALLY know where PH_actions originates. At first I thought the PH was Package Handler, but it was actually the Post History mod I have installed. I'm so angry at myself.

Here's where it is in the main PostHistory.php file:

function PH_actions(&$actionArray)
{
global $modSettings;

if (empty($modSettings['posthistoryEnabled']))
return;

$actionArray['posthistory'] = array('PostHistory.php', 'PostHistory');
}


Besides PH_actions, there's other functions such as PH_core_features. After this, it's only ever mentioned one more time in the mod package. Specifically in install.php:

<?php

if (!defined('SMF'))
{
require_once(dirname(dirname(__FILE__)) . '/SSI.php');
require_once(dirname(__FILE__) . '/Database.php');
require_once(dirname(__FILE__) . '/Subs-Install.php');
}

global 
$txt$smcFunc$db_prefix$modSettings;
global 
$addSettings$permissions$tables$sourcedir;

// Step 1: Do tables
doTables($tables);

// Step 2: Do Settings
doSettings($addSettings);

// Step 3: Update admin features
updateAdminFeatures('posthistory', !empty($modSettings['posthistoryEnabled']));

//
add_integration_function('integrate_pre_include''$sourcedir/PostHistory.php');
add_integration_function('integrate_actions''PH_actions');
add_integration_function('integrate_core_features''PH_core_features');
add_integration_function('integrate_load_permissions''PH_load_permissions');

?>


The big question is... How specifically should I go about editing the PostHistory.php file so it doesn't spam the log file with errors anymore?

Arnox

EDIT: Fixed too! The error log has FINALLY BLESSEDLY stopped giving errors related to Post History. I just removed the '&' from '$actionArray' in PostHistory.php

The very similar spoiler_buffer error was also related to my Quick Spoiler mod I had installed. I removed the '&' from '$buffer' in Subs-QuickSpoiler.php too.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: