Zend Framework

Zend_Locale_Format::isNumber does not call checkOptions and validate $options['locale'] exists

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5.0
  • Fix Version/s: 1.5.1
  • Component/s: Zend_Locale
  • Labels:
    None
  • Fix Version Priority:
    Must Have

Description

Zend_Locale_Format::isNumber does not call checkOptions and validate $options['locale'] exists

public static function isNumber($input, array $options = array())
    {
        // Get correct signs for this locale
        $symbols = Zend_Locale_Data::getList($options['locale'],'symbols');

        // Parse input locale aware
        $regex = '/^([' . $symbols['minus'] . '-]){0,1}(\d+(\\' . $symbols['group']
            . '){0,1})*(\\' . $symbols['decimal'] . '){0,1}\d+$/';
        preg_match($regex, $input, $found);

        if (!isset($found[0]))
            return false;
        return true;
    }

This can cause a php error.

Activity

Hide
Thomas Weidner added a comment -

Fixed with SVN-8884

Show
Thomas Weidner added a comment - Fixed with SVN-8884
Hide
Wil Sinclair added a comment -

I'm assuming this fix is merged to the 1.5 release branch for release with 1.5.1. Please update JIRA if this is not the case.

Show
Wil Sinclair added a comment - I'm assuming this fix is merged to the 1.5 release branch for release with 1.5.1. Please update JIRA if this is not the case.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
5m
Original Estimate - 5 minutes
Remaining:
5m
Remaining Estimate - 5 minutes
Logged:
Not Specified
Time Spent - Not Specified