Member
Member
libelle   2007-11-10, 03:32
#1

I found that when I used Akismet anti-spam plugin, I was getting an error on line 196 of zenphoto/zp-core/plugins/spamfilters/akismet.php that it was missing parameter 1.

I rewrote the function. Not sure it's perfect, but it works for me.

function isError() {
return (isset($this->errors) && count($this->errors) > 0);
}

Member
Member
sbillard   2007-11-10, 04:03
#2

I think what you want to do is change line 81: if ($akismet->isError()) {
to
`if (count($akismet->errors)) {'

I do not have the ability to test this (don't have an akismet key.) Thinkdreams did the implementation, he should comment on this fix.

Anyway, the isError() routine needs a parameter, which is what the complaint was. It seems that normally you pass it an error code and it will return true if the error exists and false if it does not. BUT, what I believe line 81 is trying to do is check if there are any errors. isError() is not the vehicle for that.

Member
Member
libelle   2007-11-13, 01:13
#3

Your fix works correctly as well.

As the comments say, there's room for improvement in the error handling in that call anyway.

Member
Member
sbillard   2007-11-13, 01:27
#4

We will release a fix to the SVN tonight. Thank you for your response.

Member
Member
Aegist   2007-12-16, 12:43
#5

Thanks sbillard. I was having the same problem. Simple fix, all works well now.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.