mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing form attribute access and broken test.
This commit is contained in:
parent
ef85fb1247
commit
76f94d5c75
2 changed files with 3 additions and 3 deletions
|
@ -615,8 +615,8 @@ class FormHelper extends AppHelper {
|
|||
if ($legend === true) {
|
||||
$actionName = __('New %s');
|
||||
$isEdit = (
|
||||
strpos($this->action, 'update') !== false ||
|
||||
strpos($this->action, 'edit') !== false
|
||||
strpos($this->request->params['action'], 'update') !== false ||
|
||||
strpos($this->request->params['action'], 'edit') !== false
|
||||
);
|
||||
if ($isEdit) {
|
||||
$actionName = __('Edit %s');
|
||||
|
|
|
@ -2206,7 +2206,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$View = ClassRegistry::getObject('view');
|
||||
$this->Form->create('Contact');
|
||||
$this->Form->request['prefix'] = 'admin';
|
||||
$this->Form->action = 'admin_edit';
|
||||
$this->Form->request['action'] = 'admin_edit';
|
||||
$result = $this->Form->inputs();
|
||||
$expected = array(
|
||||
'<fieldset',
|
||||
|
|
Loading…
Add table
Reference in a new issue