diff options
author | Silvio <silvio@devlet.com.br> | 2010-09-29 16:12:59 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-09-29 16:12:59 -0300 |
commit | dc17ba3eacb50689199108d62979b3a49f126892 (patch) | |
tree | dac5114de293a909ea754c5092cb6ca935b2edc4 | |
parent | d08ea84c85b03cf893266e10ea14e6e8a55ca264 (diff) | |
download | cinisis-dc17ba3eacb50689199108d62979b3a49f126892.tar.gz cinisis-dc17ba3eacb50689199108d62979b3a49f126892.tar.bz2 |
Method explodeBrackets checking first if hasBrackets
-rw-r--r-- | classes/IsisReader.php | 9 | ||||
-rw-r--r-- | config/config.yaml | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/classes/IsisReader.php b/classes/IsisReader.php index 9926d3b..deca387 100644 --- a/classes/IsisReader.php +++ b/classes/IsisReader.php @@ -96,8 +96,13 @@ class IsisReader { * Array of matched strings. */ public function explodeBrackets($subject) { - preg_match_all('/<[^<>]*>/', $subject, $values); - return $this->filterBrackets($values[0]); + if ($this->hasBrackets($subject)) { + preg_match_all('/<[^<>]*>/', $subject, $values); + return $this->filterBrackets($values[0]); + } + else { + return array($subject); + } } /** diff --git a/config/config.yaml b/config/config.yaml index 0f81b48..a8ab772 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,3 +1,3 @@ --- implementation: BiblioIsis -database: film +database: poster |