When running 7.x-2.0-beta2 in PHP 5.2.4-2ubuntu5.18, the following warning is generated:

Warning: json_encode() expects exactly 1 parameter, 2 given in radioactivity_page_alter() (line 260 of /mnt/www/html/advmediadev/docroot/sites/all/modules/contrib/radioactivity/radioactivity.field.inc).

This appears to be caused by this line in radioactivity.field.inc:

$register = json_encode($register, true);

Comments

tcmug’s picture

Lucky its only a warning.

Fixed in head, can you test if the json_decode in emit.php causes something like this also?

bdang’s picture

I'm looking @ emit.php in eclipse, and it's giving me this warning @ line 26

if ($class::REQUIRE_BOOTSTRAP) {
// verify boostrapping
_radioactivity_require_bootstrapping();
}

syntax error, unexpected ::

===========================

I'm also getting this error [1] after I migrated my sandbox up to my dev server with go daddy.

[1] Warning: json_encode() expects exactly 1 parameter, 2 given in radioactivity_page_alter() (line 260 of /home/content/49/7428349/html/comics/sites/all/modules/radioactivity/radioactivity.field.inc)

I"m using PHP 5.2, so that's why I'm getting the error. The use of class constants is permissable for > PHP5.2 ? Godaddy defaults to PHP 5.2, so I"m checking to see if changing the setting to PHP 5.3 will fix the problem .

http://help.godaddy.com/article/3937

tcmug’s picture

Assigned: Unassigned » tcmug
Status: Active » Needs work

Warnings are a bitch, but looks like I need to rewrite that part sooner than I expected. I'll do that as soon as I get back to working mode.

bdang’s picture

I set my godaddy dev server to run PHP 5.3, and the warning is gone. :)

lsancheztapia’s picture

If I have PHP5.2, how can I fix ?

tcmug’s picture

Status: Needs work » Fixed

This is now fixed in rc1, changed to serialize/unserialize

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.