![]() |
|
update causing problem with commented code - 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: update causing problem with commented code (/thread-6287.html) |
update causing problem with commented code - gracestanat - 2009-12-15 Just updated to the nightly build (12/14/09). I updated from quite a ways back, so I doubt the problem I've encountered is due to this particular build. But the problem is nonetheless a VERY strange one. Some code that I have commented out seems to cause a problem. Here's my comment block: ` ` If I change it to this, it works: ` ` So it's something to do with this text: printCustomSizedImageMaxHeight(480) Changing it to any of the following makes the error go away: ` printCustomSizedImage(480) printCustomSizedImageSOMETHING(480)` But the following versions still cause the error: ` printCustomSizedImageMaxHeight(480) printCustomSizedImageMax480) printCustomSizedImageHeight(480) ` Needless to say, I am mystified. Any ideas? update causing problem with commented code - acrylian - 2009-12-15 You neither said from what version you upgrade nor what actually the problem is... Anyway, the Btw, PHP code within HTML comments is of course executed. update causing problem with commented code - gracestanat - 2009-12-16 Thanks for responding so quickly. I didn't worry about the versions since I don't think that's the problem. I think the problem is in my coding syntax. And you seem to have verified that. And yes, I realize that function is deprecated; I'm not using yet, but thanks for the tip about the plugin - that could be useful at some point. I had no idea that php code within HTML comments is executed. So am I right that I have to comment out PHP code INSIDE the commented-out HTML code? Seems strange, but of course I can make that change. update causing problem with commented code - sbillard - 2009-12-16 The general rules of evaluation are that all php code is evaluated. Code within an html comment will generate part of that comment, which will, naturally, be commented out. That is how you can make specific comments like the ones at the bottom of your scripts that zenphot generates giving the version, etc. |