Closed (fixed)
Project:
Office Hours
Version:
8.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2021 at 10:29 UTC
Updated:
10 May 2023 at 07:34 UTC
Jump to comment: Most recent
The isEmpty method (\Drupal\office_hours\Element\OfficeHoursDatetime::isEmpty) fails on a -1 value. It checks for a string '-1' but sometimes it gets the -1 integer and doesn't mark that as empty.
(using the dev release) I added a field to a node, with the exceptions. After adding an item and exception, I re-edited the node and removed the exception. Upon saving, there are a lot of form-errors: This value should be of the correct primitive type.
Change the check to if ((int) $element === -1) { ... }
-
-
-
-
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
johnvComment #4
johnvComment #6
johnvThanks, fixed in a slightly different version.
Comment #9
johnvComment #11
johnvThe tests/src/Unit/OfficeHoursDatetimeUnitTest.php was fixed in above commit.