File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
app/code/Magento/Cron/Model/Config/Backend Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ public function afterSave()
77
77
$ frequency = $ this ->getData ('groups/productalert_cron/fields/frequency/value ' );
78
78
79
79
$ cronExprArray = [
80
- is_array ( $ time ) ? ( int )$ time [1 ] : 0 , //Minute
81
- is_array ( $ time ) ? ( int )$ time [0 ] : 0 , //Hour
80
+ ( int )( $ time [1 ] ?? 0 ) , //Minute
81
+ ( int )( $ time [0 ] ?? 0 ) , //Hour
82
82
$ frequency == \Magento \Cron \Model \Config \Source \Frequency::CRON_MONTHLY ? '1 ' : '* ' , //Day of the Month
83
83
'* ' , //Month of the Year
84
84
$ frequency == \Magento \Cron \Model \Config \Source \Frequency::CRON_WEEKLY ? '1 ' : '* ' , //Day of the Week
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ public function afterSave()
77
77
$ frequency = $ this ->getData ('groups/generate/fields/frequency/value ' );
78
78
79
79
$ cronExprArray = [
80
- is_array ( $ time ) ? ( int )$ time [1 ] : 0 , //Minute
81
- is_array ( $ time ) ? ( int )$ time [0 ] : 0 , //Hour
80
+ ( int )$ time [1 ] ?? 0 , //Minute
81
+ ( int )$ time [0 ] ?? 0 , //Hour
82
82
$ frequency == \Magento \Cron \Model \Config \Source \Frequency::CRON_MONTHLY ? '1 ' : '* ' , //Day of the Month
83
83
'* ' , //Month of the Year
84
84
$ frequency == \Magento \Cron \Model \Config \Source \Frequency::CRON_WEEKLY ? '1 ' : '* ' , //# Day of the Week
You can’t perform that action at this time.
0 commit comments