Skip to content

Commit

Permalink
Resolves the issue in UnionOfRAD#460
Browse files Browse the repository at this point in the history
  • Loading branch information
joebeeson committed Jul 21, 2013
1 parent 20ff5b1 commit fe455fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/source/Database.php
Expand Up @@ -355,7 +355,7 @@ public function name($name) {
*/
protected function _splitFieldname($field) {
if (is_string($field)) {
if (preg_match('/^[a-z0-9_-]+\.([a-z0-9_-]+|\*)$/i', $field)) {
if (preg_match('/^[a-z0-9_-]+\.([a-z 0-9_-]+|\*)$/i', $field)) {
return explode('.', $field, 2);
}
}
Expand Down
3 changes: 3 additions & 0 deletions tests/cases/data/source/DatabaseTest.php
Expand Up @@ -101,6 +101,9 @@ public function testName() {

$result = $this->_db->name("Model.name");
$this->assertEqual("{Model}.{name}", $result);

$result = $this->_db->name("Model.name name");
$this->assertEqual("{Model}.{name name}", $result);
}

public function testValueWithSchema() {
Expand Down

0 comments on commit fe455fb

Please sign in to comment.