diff options
author | Silvio <silvio@devlet.com.br> | 2010-08-11 17:50:38 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-08-11 17:50:38 -0300 |
commit | b54991f7f2bbce1f15d2b5d561eeef92194e1700 (patch) | |
tree | 2c9a981896ca9ea022f57f93068d384b04c521ea /classes/IsisConnector.php | |
parent | bd60d89fc77e87a200bd6145ec894fe0a572a209 (diff) | |
download | cinisis-b54991f7f2bbce1f15d2b5d561eeef92194e1700.tar.gz cinisis-b54991f7f2bbce1f15d2b5d561eeef92194e1700.tar.bz2 |
Fixing iterators' indexes
Diffstat (limited to 'classes/IsisConnector.php')
-rw-r--r-- | classes/IsisConnector.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index 2b4fe28..e845683 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -103,7 +103,12 @@ class IsisConnector { * Number of rows. */ public function getRows($field) { - return count($this->result[$field['name']]); + if (isset($this->result[$field['name']])) { + return count($this->result[$field['name']]); + } + else { + return 0; + } } /** @@ -735,7 +740,11 @@ class IsisConnector { * Subfield name. */ public function getSubfieldName($field_key, $subfield_key) { - return $this->format['fields'][$field_key]['subfields'][$subfield_key]; + if (isset($this->format['fields'][$field_key]['subfields'][$subfield_key])) { + return $this->format['fields'][$field_key]['subfields'][$subfield_key]; + } + + return FALSE; } /** @@ -771,7 +780,7 @@ class IsisConnector { */ public function hasFieldSubfieldCondition($field, $subfield, $key, $subkey) { $field_key = $this->getFieldKey($field); - $subdield_key = $this->getSubfieldKey($field, $subfield); + $subfield_key = $this->getSubfieldKey($field, $subfield); if ($field_key == $key && $subfield_key == $subkey) { return true; |