(cp 1110d79) fixed #1756 php8 warning with trim() and escape input values

This commit is contained in:
Matthieu Leproux
2022-10-19 16:00:38 +02:00
parent 5f1f3cb102
commit 60841121d1
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -214,10 +214,10 @@ SELECT count(1) FROM '.COMMENTS_TABLE.'
INSERT INTO '.COMMENTS_TABLE.'
(author, author_id, anonymous_id, content, date, validated, validation_date, image_id, website_url, email)
VALUES (
\''.$comm['author'].'\',
\''.pwg_db_real_escape_string($comm['author']).'\',
'.$comm['author_id'].',
\''.$comm['ip'].'\',
\''.$comm['content'].'\',
\''.pwg_db_real_escape_string($comm['content']).'\',
NOW(),
\''.($comment_action=='validate' ? 'true':'false').'\',
'.($comment_action=='validate' ? 'NOW()':'NULL').',