Hello,
In my Error Log I see
Undefined index: icon
File: /home/mydomain/public_html/Sources/Post.php
Line: 1615
But postings are fine.. what is causing this ?
Whats on that line? can you attach that file here.
I have attached it.. please check
Here's the line in question:
'icon' => preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']),
The error message says that there is no "icon" element in the POST data. If that is something reasonable (i.e., not an error condition itself), it could be fixed:
'icon' => preg_replace('~[\./\\\\*\':"<>]~', '', (isset($_POST['icon'])? $_POST['icon'], '')),
Before you do that, the preg_replace search pattern looks a bit odd. It's looking for a single character chosen from:
\. -> a literal period .
/ -> a forward slash /
\\ -> a backslash \
\\ -> another backslash \ ? why ?
* -> a star *
\' -> an apostrophe/single quote '
: -> a colon :
" -> a quotation mark "
< -> a left angle bracket <
> -> a right angle bracket >
I'm wondering if there is an extra backslash in the list, and the intent was to escape (unnecessarily) the * like this: \*
'icon' => preg_replace('~[\./\\\*\':"<>]~', '', $_POST['icon']),
In fact, I think you can remove more of the backslashes:
'icon' => preg_replace('~[./\\*\':"<>]~', '', $_POST['icon']),
I have no idea if this has any bearing on the original problem...