Skip to main content

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

It should have been fixed in the 1.0.2 release, apparently it wasn't...
Can you open (or re-open actually) this bug?

Thanks for your time,

-----Original Message-----
From: pdt-dev-bounces@xxxxxxxxxxx [mailto:pdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Jeremia
Sent: Friday, February 08, 2008 11:17 AM
To: pdt-dev@xxxxxxxxxxx
Subject: [pdt-dev] Wrong warnings in html-embedded php code


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)): ?>
<?php else: ?>
<div class="<?=$class?>">
<?php endif; ?>
    <form action="post">
        <textarea rows="20" cols="40"><?=$text?></textarea><br/>
        <input type="submit" value="save"></input>

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>

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
pdt-dev mailing list

Back to the top