Posted by neomenlo on January 6, 2012 at 7:31am
4 followers
| Project: | Radioactivity |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | tcmug |
| Status: | closed (fixed) |
Issue Summary
I got this error in my /radioactivity/error_log:PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /radioactivity/emit.php on line 27
The offending lines were:
<?php
if ($class::REQUIRE_BOOTSTRAP) {
// verify boostrapping
_radioactivity_require_bootstrapping();
}
?>To fix this issue, I simply commented out the if and its closing bracket. I figured it wouldn't kill it to initialize twice. I didn't give it much thought beyond that, but it works now.
Comments
#1
Tell me a bit more about your decay profile configuration: have you selected a decay profile for the field?
I guess this could happen when the $class is empty or the class is actually missing - seeing that as a real possibility I added a class_exists check in the emit.php.
#2
I'm pretty sure I had a decay profile. I don't think the class was empty either. I think there might be a chance it was the version of PHP I'm using (5.2.17), or maybe one of the many security rules in place by my host.
#3
Sorry, but I've not been able to reproduce this - leaving the only option that it is the PHP version.
#4
This is definitely reproducible. I created a field on a node type with (mostly?) default configurations (except for half-lives and energy emissions etc (including live/database energy storage) and came across this error. It's rather frustrating because it is difficult to debug. The module appears to simply not work for no apparent reason, and neither watchdog nor the status report report anything interesting. I am also using PHP version 5.2.17.
Changing
$class::REQUIRE_BOOTSTRAPto$storage->REQUIRE_BOOTSTRAPon line 31 ofemit.phpsolved the problem.#5
It might be best to replace the constant all together with a method - requiresBootstrap()
Can you give the attached patch a go? Its a simple wrapper that uses self:: which should work for your PHP version, I'll make a more permanent fix for the next minor version update.
I'm running 5.3.6 so no wonder its working for me and not for you, and the error it throws felt just weird, but now it makes sense.
Thanks for your effort and pain :)
#6
Patch works!
Thank you
#7
Excellent :)
#8
I assume that means it was committed?
Thanks for the fast turnaround! :)
#9
Yes it is as of now in the dev version, I'll work on it later this week for a full release