Handle Invalid condition for get book_visibility from book configuration

Created on 5 April 2024, 3 months ago

Problem/Motivation

error when zero node present of book condition to get max from array of max(array_values($this->configuration['book_visibility']))

Steps to reproduce

  ID   Date           Type      Severity   Message                                                                                          
 ---- -------------- --------- ---------- ------------------------------------------------------------------------------------------------- 
  52   05/Apr 09:45   php       Error      ValueError: max(): Argument #1 ($value) must contain at least one element in max() (line 152 of  
                                           /var/www/html/patch/web/modules/contrib/book_visibility/src/Plugin/Condition/BookVisibility.

Proposed resolution

check the size of array array_values($this->configuration['book_visibility']) if greater then one then check max(array_values($this->configuration['book_visibility']))

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India govind_giri_goswami

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024