ZenphotoCMS Forum
printCommentErrors() - isset() always TRUE - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: printCommentErrors() - isset() always TRUE (/thread-3496.html)



printCommentErrors() - isset() always TRUE - keyoshix - 2008-08-18

Hello,

i just working on my new Template and yesterday i updatet my local zenphoto installation. Now i noticed that the template-function.php printCommentErrors() prints always out the without any error.

I looked in the source with the following code:
`

function printCommentErrors($class = 'error') {

global $_zp_comment_error;

if (isset($_zp_comment_error)) {

    echo "";

    switch ($_zp_comment_error) { *snip* }

    echo "";

}

return $_zp_comment_error;

}

`
I checked the var $_zp_comment_error and this var is always set (isset() == TRUE); but with no value.

Now my Question, is this fault only in my installation?

Tom




printCommentErrors() - isset() always TRUE - keyoshix - 2008-08-18

My Workaround:

`

global $_zp_comment_error;

if(!$_zp_comment_error) unset($_zp_comment_error);

`

I use Borders on my boxes, so i can always see the Border - also if no Error suplied.

Tom




printCommentErrors() - isset() always TRUE - sbillard - 2008-08-18

You can download the nightly build. This problem was reported and fixed yesterday.

But, of course, your workaround will be fine too.




printCommentErrors() - isset() always TRUE - keyoshix - 2008-08-18

thx 4 your fast Support