@@ -92,11 +92,11 @@ class sfCultureInfo
9292 * @var sfNumberFormatInfo
9393 */
9494 protected $ numberFormat ;
95-
95+
9696 /**
9797 * A list of properties that are accessable/writable.
9898 * @var array
99- */
99+ */
100100 protected $ properties = array ();
101101
102102 /**
@@ -191,9 +191,9 @@ public function __set($name, $value)
191191 }
192192
193193 /**
194- * Initializes a new instance of the sfCultureInfo class based on the
194+ * Initializes a new instance of the sfCultureInfo class based on the
195195 * culture specified by name. E.g. <code>new sfCultureInfo('en_AU');</code>
196- * The culture indentifier must be of the form
196+ * The culture indentifier must be of the form
197197 * "<language>_(country/region/variant)".
198198 *
199199 * @param string $culture a culture name, e.g. "en_AU".
@@ -323,7 +323,7 @@ protected function loadCultureData($culture)
323323 * this function.
324324 *
325325 * @param string $filename the ICU data filename
326- * @return array ICU data
326+ * @return array ICU data
327327 */
328328 protected function &getData ($ filename )
329329 {
@@ -347,7 +347,7 @@ protected function &getData($filename)
347347 * Use merge=true to return the ICU including the parent culture.
348348 * E.g. The currency data for a variant, say "en_AU" contains one
349349 * entry, the currency for AUD, the other currency data are stored
350- * in the "en" data file. Thus to retrieve all the data regarding
350+ * in the "en" data file. Thus to retrieve all the data regarding
351351 * currency for "en_AU", you need to use findInfo("Currencies,true);.
352352 *
353353 * @param string $path the data you want to find.
@@ -429,9 +429,9 @@ protected function searchArray($info, $path = '/')
429429 }
430430 }
431431 }
432-
432+
433433 /**
434- * Gets the culture name in the format
434+ * Gets the culture name in the format
435435 * "<languagecode2>_(country/regioncode2)".
436436 *
437437 * @return string culture name.
@@ -516,7 +516,7 @@ public function getEnglishName()
516516 $ culture = $ this ->getInvariantCulture ();
517517
518518 $ language = $ culture ->findInfo ("Languages/ {$ lang }" );
519- if (count ($ language ) == 0 )
519+ if (is_array ( $ language ) && count ($ language ) == 0 )
520520 {
521521 return $ this ->culture ;
522522 }
@@ -547,7 +547,7 @@ static function getInvariantCulture()
547547 }
548548
549549 /**
550- * Gets a value indicating whether the current sfCultureInfo
550+ * Gets a value indicating whether the current sfCultureInfo
551551 * represents a neutral culture. Returns true if the culture
552552 * only contains two characters.
553553 *
@@ -590,7 +590,7 @@ public function setNumberFormat($numberFormat)
590590 }
591591
592592 /**
593- * Gets the sfCultureInfo that represents the parent culture of the
593+ * Gets the sfCultureInfo that represents the parent culture of the
594594 * current sfCultureInfo
595595 *
596596 * @return sfCultureInfo parent culture information.
@@ -606,14 +606,14 @@ public function getParent()
606606 }
607607
608608 /**
609- * Gets the list of supported cultures filtered by the specified
609+ * Gets the list of supported cultures filtered by the specified
610610 * culture type. This is an EXPENSIVE function, it needs to traverse
611611 * a list of ICU files in the data directory.
612612 * This function can be called statically.
613613 *
614614 * @param int $type culture type, sfCultureInfo::ALL, sfCultureInfo::NEUTRAL
615615 * or sfCultureInfo::SPECIFIC.
616- * @return array list of culture information available.
616+ * @return array list of culture information available.
617617 */
618618 static function getCultures ($ type = sfCultureInfo::ALL )
619619 {
@@ -719,7 +719,7 @@ public function getLanguage($code)
719719 *
720720 * @param array $countries An array of countries used to restrict the returned array (null by default, which means all countries)
721721 *
722- * @return array a list of localized country names.
722+ * @return array a list of localized country names.
723723 */
724724 public function getCountries ($ countries = null )
725725 {
0 commit comments