ZF-11639: Zend_Ldap casts all numeric fields to a float (including telephone numbers).

Description

When using Zend_Ldap to access the telephoneNumber attribute, or in deed any similar attribute, by means of getAttribute(), it always casts the value to a float due to the value being numeric.

For example, if this was found within an LDAP entry: bq. +442012345678

The function: bq. $ldapNode->getAttribute("telephoneNumber", 0)

Would return: bq. 442012345678

The problem resides in: bq. Zend_Ldap_Converter::fromLdap() (line 221)

Comments

fixed in r24349

Thanks for the fix. Although there will still be an issue when a user enters a phone number without the international calling code.

Is there even a need to cast it to a float with PHP's typing? Let the implementation decide how to treat it.

I removed the type-casting to float completely. Although this is a minor BC breakage, I don't think it'll affect anybody unless some user is relying on the type returned.

Code is updated with r24353 in trunk (r24354 in 1.11-release branch).