0

I got too many for this warning debug in wordpress ver 4.2.4 but they didnt showed which file gave this warning.

debug.log show only this message.

PHP Notice:  Undefined offset: 4
PHP Notice:  Undefined index: 36
PHP Notice:  Undefined property: stdClass::$unread
PHP Notice:  Undefined index: topicname

How can I find and fix this warning?

G.L.P
  • 7,119
  • 5
  • 25
  • 41
zudar
  • 1
  • 1
  • 1
    See: http://stackoverflow.com/q/12769982/3933332 – Rizier123 Aug 12 '15 at 07:39
  • Also that we are really able to help you, you need to show us the relevant code. – Rizier123 Aug 12 '15 at 07:51
  • 1
    @Rizier123 The point here is that the OP doesn't know what code this error pertains to because the log doesn't tell. – deceze Aug 12 '15 at 07:53
  • @deceze I'm not a wordpress expert, but you mean that the error log doesn't even contain the line number + file ? – Rizier123 Aug 12 '15 at 07:55
  • 1
    @Rizier123 Apparently not. I'd guess Wordpress is adding its own error handler and log processing... (not that I'm a Wordpress expert either, god forbid, but I wouldn't be surprised). – deceze Aug 12 '15 at 07:58
  • I already fix other error if it have ":in /directory/file.php". But I can not find .php file because my log show only that msg. – zudar Aug 12 '15 at 07:58
  • @deceze I would guess, then this is one of the *most helpful error logs* :] – Rizier123 Aug 12 '15 at 08:01
  • 1
    @Rizier123 Well, Wordpress is one of the Most Helpful Softwares™... Ask anyone who needs to pwn a few boxen, they all agree... ;o) – deceze Aug 12 '15 at 08:02
  • I think all error from simplepress plugin but I don't know what file get error. – zudar Aug 12 '15 at 10:45

1 Answers1

-1

you can use following php code in index file according to your need

// Turn off all error reporting

error_reporting(0);

OR

// Report all errors except E_NOTICE

error_reporting(E_ALL & ~E_NOTICE);

Yusuf
  • 703
  • 8
  • 13