[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] Wrong warnings in html-embedded php code

Hi,

I'm using Eclipse with the PDT plugin for a while and like to create html-templates with embedded php code in html tags. Mostly this works perfect, but there are some cases where I get warnings which shouldn't be there.

If I write something like this:

<input type="checkbox" name="<?=$name?>" _<?=$checked?'checked="checked"':'' ?>_></input>

I get a warning at the underlined part which says:

"Undefined attribute name (<?=$checked?'checked="checked"':'' ?>)"

There are some other cases where i get errors with embedded php code which shouldn't be there:

<?php if(empty($class)): ?>
<div>
<?php else: ?>
<div class="<?=$class?>">
<?php endif; ?>
   <form action="post">
       <textarea rows="20" cols="40"><?=$text?></textarea><br/>
       <input type="submit" value="save"></input>
   </form>
</div>

Here is actually nothing marked as warning but the file has a warning marker on it. If I change the code to this:

<div class="<?=$class?>">
   <form action="post">
       <textarea rows="20" cols="40"><?=$text?></textarea><br/>
       <input type="submit" value="speichern"></input>
   </form>
</div>

Then the marker disappears.

Is there any possibility to switch of these special warnings? I'm always trying to keep my code clean and these wrong warnings makes it hard to see for me where I've done something wrong.

Greets Jeremia