Closed (fixed)
Project:
Radioactivity
Version:
7.x-2.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Nov 2011 at 21:51 UTC
Updated:
18 Jan 2012 at 08:30 UTC
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
Comment #1
tcmug commentedLucky its only a warning.
Fixed in head, can you test if the json_decode in emit.php causes something like this also?
Comment #2
bdang commentedI'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
Comment #3
tcmug commentedWarnings 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.
Comment #4
bdang commentedI set my godaddy dev server to run PHP 5.3, and the warning is gone. :)
Comment #5
lsancheztapia commentedIf I have PHP5.2, how can I fix ?
Comment #6
tcmug commentedThis is now fixed in rc1, changed to serialize/unserialize