update causing problem with commented code

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?

Comments

  • acrylian Administrator, Developer
    You neither said from what version you upgrade nor what actually the problem is...

    Anyway, the `MaxHeight` functions are deprecated and have been replaced by a set of `maxspace` functions (for fixed width x height) for some versions now so the plugin `deprecated-function` has to be enabled to use this function. Best is of course you update your theme. See the documentation for the `maxspace` ones.

    Btw, PHP code within HTML comments is of course executed.
  • 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.
  • 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.
Sign In or Register to comment.