Threaded Comments
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy
PHP Error upon comment submit in EE 2.5.5
Support Request
Jannis Gundermann
|
Posted: 18 March 2013 01:21 AM |
|
|
|
Hi Yuri,
I’ve upgraded my install to 2.5.5 recently and also upgraded Threaded Comments to 2.4.3 and I am now seeing a PHP error (below) thrown when a user successfully submit the comment form.
The error is this:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: EE_Input::$IP
Filename: threaded_comments/mod.threaded_comments.php
Line Number: 225
The code in mod.threaded_comments.php this refers to is inside the “timelock?” block and reads:
$q = $DB->query("SELECT comment_id FROM exp_comments WHERE comment_date > '$time' AND ip_address = '$IN->IP' LIMIT 1");
It would be great to get a fix out asap as this snuck past me in my pre-deployment testing and is currently running on a live site in this broken state.
Many thanks,
Jannis
|
|
|
Jannis Gundermann
|
Posted: 18 March 2013 01:30 AM |
# 1
|
|
|
Actually… I’ve looked around the file a bit more and think I have fixed it by changing
ip_address = '$IN->IP'
to
ip_address = '$IN->ip_address()'
The error is gone for the moment but I can’t tell if my code change has any further repercussions on other parts of the add-on.
|
|
|
Yuri Salimovskiy
|
Posted: 18 March 2013 06:30 AM |
# 2
|
|
Developer
|
Looks like $IP variable has been removed in latest release of EE. Thank you for the patch, I’ll inculde it into next version and release it soon.
|
|
|