wp-slack icon indicating copy to clipboard operation
wp-slack copied to clipboard

PHP Notice/Warning

Open monstercodeDev opened this issue 8 years ago • 3 comments

Hi,

we noticed the following php notices / warning in our log file:

PHP Notice Trying to get property of non-object in .... slack/includes/post-type.php on line 464 PHP Notice: Uninitialized string offset: 0 in ... slack/includes/post-type.php on line 469 PHP Warning: Illegal string offset 'active' in ... slack/includes/post-type.php on line 469

On line 464 there is the get_current_screen() function, which is defined on most admin pages, but not all. Here - if I'm right - it exists, but returns with NULL.

On line 469 the get_post_meta() function will return as string, but the code checks it as an array.

Thanks,

cc @lkraav

monstercodeDev avatar May 30 '17 13:05 monstercodeDev

Thanks for the report, will take a look.

gedex avatar May 30 '17 13:05 gedex

@gedex any updates here?

lkraav avatar Jun 19 '17 15:06 lkraav

Figured it out, it's about calling post class functions (aka loading post entries) during an AJAX call.

lkraav avatar Jun 28 '17 21:06 lkraav