tags:

views:

50

answers:

2

Edit: Look at this question with IE8 and compare it to Firefox 3.6.

I am using PHP/Pear HTMLQuickForm and HTMLQuickForm_Controller to do some stuff with HTML-forms. Then I noticed that certain phone numbers would not be displayed even though the data had been loaded correctly.

I boiled it down to the following rather strange phenomenons that have me completely baffled:

$this->addElement('static', null, 'Telefon:', '04556-8978765');

will just show "Telefon:" in Firefox 3.6. In IE8 I see "Telefon: 04556-8978765" as expected.

$this->addElement('static', null, 'Telefon:', '904556-8978765');

displays just "Telefon: 9" in Firefox 3.6 and correctly "Telefon: 904556-8978765" in IE8.

On the other hand

$this->addElement('static', null, 'Telefon:', '099828-67776554');

shows "Telefon: 099828-67776554" in both browsers. So my question is this: What is so special about the string 04556-8978765 that Firefox 3.6 refuses to render it?

And it gets even weirder: The strings 0208-23345 and 02232-12345 have the same problem, but when I prefix them with any other character, then unlike 04556-8978765 they are displayed alright.

And it is not as if the missing strings are not rendered at all. On page reload I see them for a short time and then they disappear for good.

Now try to guess the result of

$this->addElement('static', null, 'Telefon:', '04556-8978765'); $this->addElement('static', null, 'Telefon:', '04556-8978765');

Right, it is not

Telefon: 04556-8978765
Telefon: 04556-8978765

as expected, but rather

Telefon:
Telefon: 04556-8978765

Can anybody make any sense of this?

Edit: When I looked at the post after I had it submitted, I noticed that the line of code right after "... completely baffled" appears as

$this->addElement('static', null, 'Telefon:', ''); and not as

$this->addElement('static', null, 'Telefon:', '04556-8978765');

It seems like any first occurence of '04556-8978765' will not be rendered in Firefox 3.6.

A: 

It has nothing to do with Pear. Just try

<?php echo('04556-8978765'); ?>

and look at the result with Firefox 3.6 and IE8. Then try e.g.

<?php echo('4556-8978765'); ?>

chessweb
A: 

I haven't been able reproduce this on a different computer with PHP 5.2.5 (instead of 5.3.1) and Firefox 3.6, so I'll downgrade my box from PHP 5.3.1 to 5.2.5 and see what happens.

chessweb