Added camelCase check for setTablePrefix. setTablePrefix now fires on PHP5. Closes #5147

Updated test in model.test to reflect changes in empty string handling for float and integer types.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7368 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-07-27 04:19:54 +00:00
parent 8185fb87fc
commit 9b857e9f36
2 changed files with 3 additions and 3 deletions

View file

@ -348,8 +348,8 @@ class Model extends Overloadable {
if ($this->useTable === null) {
$this->useTable = Inflector::tableize($this->name);
}
if (in_array('settableprefix', get_class_methods($this))) {
$methods = get_class_methods($this);
if (in_array('settableprefix', $methods) || in_array('setTablePrefix', $methods)) {
$this->setTablePrefix();
}

View file

@ -4613,7 +4613,7 @@ class ModelTest extends CakeTestCase {
$this->loadFixtures('DataTest');
$TestModel =& new DataTest();
$TestModel->create(array('float' => '')) && $TestModel->save();
$TestModel->create(array()) && $TestModel->save();
$result = $TestModel->findById($TestModel->id);
$this->assertIdentical($result['DataTest']['count'], '0');
$this->assertIdentical($result['DataTest']['float'], '0');