Browse files

Forcing string ids on Active document's default getId()

  • Loading branch information...
1 parent c0e98a0 commit 11b18aa41f3f583cf44421aa2af24337ad5ad70f @bermi bermi committed May 2, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 active_document/base.php
View
2 active_document/base.php
@@ -245,7 +245,7 @@ public function setId($id){
public function getId(){
$pk = $this->getPrimaryKey();
- return isset($this->_attributes[$pk]) ? $this->$pk : null;
+ return isset($this->_attributes[$pk]) ? (string)$this->$pk : null;
}

0 comments on commit 11b18aa

Please sign in to comment.