Skip to content

Commit d266c83

Browse files
chore: improved PHP 8 support
1 parent 392f9f8 commit d266c83

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

FormHelper.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,11 @@ public static function WarnLeavingUnsaved($view, $activeForm) {
260260
* @param string $userTimeZone : Time zone of the end-user
261261
* @param array $model : Model to convert timestamp attributes for (can just be an empty model)
262262
* @param string $options : Available options:
263-
* - `format` (string)
264-
* - `modifyModel` (boolean)
263+
* - `format` (string) : how to format date using (as per date()). Default: `Y-m-d H:i:s`
264+
* - `modifyModel` (boolean) : default is false
265265
* - `multipleModels` (boolean) : set true to assume that the POST contains multiple of the given model,
266266
* ie. that the form of the fields are `$_POST[modelName][index][attribute]` instead of just the normal `$_POST[modelName][attribute]`
267+
* Default false.
267268
* - `customPostData` (array) : inject POST values manually if $_POST is not to be used.
268269
* Then the modified values are returned instead and they are not written back into neither $_POST nor Yii's request body params.
269270
*

ManageBehavior.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function resumeAllBehaviors() {
4444
- nothing
4545
*/
4646
foreach ($this->model->behaviors() as $key => $behav) {
47-
if ($this->suspendedBehaviors[$behav['class']]) {
47+
if (@$this->suspendedBehaviors[$behav['class']]) {
4848
$this->model->attachBehavior($key, $this->suspendedBehaviors[$behav['class']]);
4949
unset($this->suspendedBehaviors[$behav['class']]);
5050
}

0 commit comments

Comments
 (0)