Testing OpenScholar on local machine, Installed the version 2.0 and got the following warning nine times after finishing:

warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.

Any explanations?

Could still move forward by clicking on the orange button, warnings disappeared.

In sites url capital letters are not allowed!

When clicking 'go to your site' the following errors occurred:
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.
warning: call_user_func_array() expects parameter 2 to be array, string given in /Users/LJ/Sites/SCHOLAR-2-0-BETA10/sites/all/modules/contrib/views/views.module on line 451.

The same warnings keep occurring when clicking on other links as well.
I'm not a PHP guy so I don't know where to look or to correct the error.
Eljay

Comments

ferdi’s picture

What version of PHP are you using ? What version of OpenScholar ?
thanks,
Ferdi

mmhamric’s picture

I am seeing the same issue. openscholar- 2.0-beta10, PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli)

eljay’s picture

PHP 5.3.2 and latest version of OpenScholar 2.0 beta 10. The same happened when I installed version beta 9, and I just now remembered I recently activated PHP 5.3.2 from previous 5.2.13. So mabye it's php that's the cause?

Update: yep, I'm using Mamp pro and switched to PHP 5.2. All warnings disappeared.

james.chen’s picture

does anybody have another way to solve this problem? I use xmapp and it is not convenience to change the php version

james.chen’s picture

this problem has been solved by user richardgoodrow, you can try his/her's method
turn
if (function_exists($callback) && call_user_func_array($callback, $argments)) {
return TRUE;
}
to
if (function_exists($callback) && call_user_func_array($callback, array($argments))) {
return TRUE;
}

I have used this method and it can work

MataHari’s picture

I experienced the EXACT same problem, except I used MAMP on my mac. Same coding problem about 'array' and 'views'.

The homepage has the white screen of death, but if I navigate to /admin, I can get into my admin section, except the warning errors as explained by the originator of this thread appear.

I just saw your post on how to remove that error. What file do I modify to fix that error? Thanks. I hope this fixes the WSOD.

MataHari’s picture

eljay did you get the problem fixed? I rec'd the same error, and I can't get even get the main homesite to display anything other than the WSOD, I'm unsure if it's due to these unexpected 'array' warnings.

on my MAMP localhost, by the way.

eljay’s picture

Hi Palebunny, I found out that I changed from PHP 5.2 to 5.3 in Mamp pro. After I switched back the output problem was resolved. The underlying problem of OpenScholar of course is still there.

ianchan’s picture

Using the solution in #1078332: unexpected warning after fresh local install resulted in numerous instances of the following errors:

array_filter() expects parameter 1 to be array, null given in /drupal/sites/all/modules/views/views.module on line 482.

array_intersect(): Argument #1 is not an array in /drupal/sites/all/modules/views/views.module on line 482.

Based on the comment here: #809226: PHP 5.3 and Services Issues with call_user_func_array

I inserted this

$arguments = (array)$arguments; // for PHP5.3

at line 451 of views.module and this problem went away.

bfroehle’s picture

MataHari’s picture

Eljay, a little late, but thank you- that fixed my problem right away too. (downgrading PHP)

paul555’s picture

subscribe

bmaxx84’s picture

Thank you ianchan comment #9