Hi,
After upgrading to EB 5.0.37, we started seeing PHP Notices in our development system (and in the server logs on live) for
PHP Notice: Undefined offset: 1 in /var/www/html/administrator/components/com_easyblog/includes/post/post.php on line 3658
Further investigation reveals this is almost certainly down to a too specific test on line 3657 which currently reads as:
if ($pos !== false) {
But should be changed to:
if ($pos != false) {
Since $pos is set by preg_match which returns, 0, 1, or FALSE. The conditional code should only execute if it's 1 (so the test could be ($post == 1) but != false somehow feels better - I can't explain why!)
Hope this helps
After upgrading to EB 5.0.37, we started seeing PHP Notices in our development system (and in the server logs on live) for
PHP Notice: Undefined offset: 1 in /var/www/html/administrator/components/com_easyblog/includes/post/post.php on line 3658
Further investigation reveals this is almost certainly down to a too specific test on line 3657 which currently reads as:
if ($pos !== false) {
But should be changed to:
if ($pos != false) {
Since $pos is set by preg_match which returns, 0, 1, or FALSE. The conditional code should only execute if it's 1 (so the test could be ($post == 1) but != false somehow feels better - I can't explain why!)
Hope this helps