Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
isset and !isset is not working because the $tmp date values are set to false. Replace with !empty and empty
Ex
if (!empty($tmp_start_date)) = false
because
($tmp_start_date = $this->_is_format_valid($this->attributes['direction'][0]))
function _is_format_valid return false and set $tmp_start_date
!empty and empty test for isset and if the value is false or ''
Add test for if date $obj->direction(array(1, 7)); to add the first array value to the second otherwise it will give error on the 7th day
Ex. if today is 2017-07-17
2017-07-18
2017-07-25 gives error because test till 2017-07-24
add the if in line 1147
if $obj->direction(array(5,7)); check for 7 days not working because $this->attributes['direction'][0] not added to $this->attributes['direction'][1] from today
add the if in line 1150
if $obj->direction(array('2017-07-18', 7')); to check 7 days didn't work because system_date used and not $this->attributes['direction'][0])
added the same to get the start date if you have the end date line 1189