PHP warnings; in_array () expects parameter in oxubase.php + cannot modify header information in oxuitils.php

Hello,

in my Oxid eSales installation I get the following PHP warnings:

Warning: in_array() expects parameter 2 to be array, null given in */views/oxubase.php on line 1448

Warning: Cannot modify header information - headers already sent by (output started at */views/oxubase.php:1448) in */core/oxutils.php on line 1125

I don’t know where it comes from or where these warnings come from and how I can fix this issue. After searching about 5 hours for the issue I hope you could help me.

Thank you so much!

DerAnfang

Hi,
is this a vanillia installation or did it appear suddenly?
Did you or your hosting provider change someat recently?

Regards

Hello,

I suppose the problem is somewhere in the template. It’s a modified version of the basic template, all files are the same like the basic template (except for the CSS, JS, images, etc.).

After the problem occured I rechanged my changes to the original via version control, but nothing changed back to the original non-warning-version.

It’s a near vanilla installation and it is “hosted” locally where nothing was changed.

Regards

Hi again,

try checking your installation with oxchkversion. Maybe during the copy process something went wrong and one or more files are corrupt.

Regards

Hi Marco,

well, I’ve tried it differently: I just downloaded a vanilla installation of the latest Oxid and copied my template into it… same error… so I suppose the error is based in the template. But I don’t know how I could find it. Do you possibly?

Thank you so much!

some helpful hints (hopefully):

If you are using the template override-system correctly, you could add file by file to your custom theme-folder and check when the error occurs again.

Hi there,

I received the same error with my own template. (Basic template worked fine.)

$this->aNrofCatArticles = array(12,24);

in the config.inc.php helped me out.
(Also see: line 1430 of the oxubase.php file.)

Regards

Hey,

I’m having nearly the same error, it says:
[I]Warning: in_array() expects parameter 2 to be array, null given in *projectname*\application\controllers\oxubase.php on line 1243[/I]

It appeared suddenly when I tried some template-canges (no changes in oxubase.php) so I withdrew my changes - but the error ist still here. Seems like this is only in my template (not in Azure). No error-message in the logfile and nothing I can read in the debug-modes -.-*

Oxid-Version is CE 4.7.1, running local on xampp and the installation was about one week ago.

Is somebody out there who can help me too? OXBERTRANDS tips doesn’t work here -.-

Thank you ^-^

Problem is solved now ^-^

I still don’t know from where the error was, but deleting tmp, browser cache, cookies and stuff solved it.