~ubuntu-branches/ubuntu/vivid/zendframework/vivid

« back to all changes in this revision

Viewing changes to library/Zend/Feed/Reader/Collection/Category.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank Habermann
  • Date: 2010-04-28 20:10:00 UTC
  • mfrom: (1.3.1 upstream) (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100428201000-o347bj5qb5i3tpot
Tags: 1.10.4-1
new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * @package    Zend_Feed_Reader
17
17
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18
18
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
19
 
 * @version    $Id: Category.php 20096 2010-01-06 02:05:09Z bkarwin $
 
19
 * @version    $Id: Category.php 20954 2010-02-06 17:56:27Z padraic $
20
20
 */
21
21
 
22
22
/**
45
45
    public function getValues() {
46
46
        $categories = array();
47
47
        foreach ($this->getIterator() as $element) {
48
 
            $categories[] = $element['label'];
 
48
            if (isset($element['label']) && !empty($element['label'])) {
 
49
                $categories[] = $element['label'];
 
50
            } else {
 
51
                $categories[] = $element['term'];
 
52
            }
49
53
        }
50
54
        return array_unique($categories);
51
55
    }