mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
8185fb87fc
commit
9b857e9f36
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue