Pls escape quotes in your garbage collector function
-
Hi, our debug.log was clogged with incorrect sql syntax error messages – coming from your function
icp_session_cleanup()
in \intelly-countdown\includes\classes\session\session.php. For some reason we had some sessions in db with a single quote character in their name (‘), so when you implode that using single quotes as separator (line 144) unescaped it raises error. I fixed this by changing in lines 137-138 to$expired_sessions[]=str_replace( "'", "''", $expiration->option_name ); $expired_sessions[]=str_replace( "'", "''", "_wp_session_$session_id" );
for example.
We had some 53k old sessions for some reason, and it was reporting whole string with that in debug log, which took 5mb per error (every hour). So our log would increase 100mb daily.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Pls escape quotes in your garbage collector function’ is closed to new replies.