diff --git a/src/Task/Helper/Task.php b/src/Task/Helper/Task.php index be7f902dd..d048846b3 100644 --- a/src/Task/Helper/Task.php +++ b/src/Task/Helper/Task.php @@ -1436,11 +1436,13 @@ private function where_completed_at() { $completed_at_start = !empty( $this->query_params['completed_at_start'] ) ? $this->query_params['completed_at_start'] : false; $completed_at_between = !isset( $this->query_params['completed_at_between'] ) ? true : pm_is_true( $this->query_params['completed_at_between'] ); $ope_params = !empty( $this->query_params['completed_at_operator'] ) ? $this->query_params['completed_at_operator'] : false; - $ope_params = $this->get_prepare_data( $ope_params ); + $ope_params = pm_get_prepare_data( $ope_params ); - if ( $completed_at === false ) { - return $this; - } + if ( empty( $ope_params ) ) { + if ( empty( $completed_at ) ) { + return $this; + } + } if ( $completed_at_start ) { $com_start_reduce = date('Y-m-d',(strtotime ( '-1 day' , strtotime ( $completed_at_start) ) )); @@ -1512,11 +1514,13 @@ private function where_due_date() { $due_date_start = !empty( $this->query_params['due_date_start'] ) ? $this->query_params['due_date_start'] : false; $due_date_between = !isset( $this->query_params['due_date_between'] ) ? true : pm_is_true( $this->query_params['due_date_between'] ); $ope_params = !empty( $this->query_params['due_date_operator'] ) ? $this->query_params['due_date_operator'] : false; - $ope_params = $this->get_prepare_data( $ope_params ); + $ope_params = pm_get_prepare_data( $ope_params ); - if ( $due_date === false ) { - return $this; - } + if ( empty( $ope_params ) ) { + if ( empty( $due_date ) ) { + return $this; + } + } if ( $due_date_start ) { $due_start_reduce = date('Y-m-d',(strtotime ( '-1 day' , strtotime ( $due_date_start) ) ));