jorani
jorani copied to clipboard
error when rejecting a leave request
Github issue tracker is used for bug only. For general questions and requests, please join the Google group
Don't hesitate to provide screenshots.
What is the version of Jorani? Jorani v1.0 PHP 8.2.6
Expected behavior, request rejected with comments
Actual behavior
An uncaught Exception was encountered Type: Error
Message: Attempt to assign property "comments" on null
Filename: D:\WWWRoot\joraniSAML\application\models\Leaves_model.php
Line Number: 682
Steps to reproduce the behavior: Reject a leave request
I confirm I have the exact same issue, with latest Jorani release from May 1st 2023, PHP 8.2.7.
Issue is here whether you enter a comment or not for the reject.
Same bug here
Hello, I have the same error message... Any update about this? Do we have a workaround?
This seems to be a one-line fix: application/models/Leaves_model.php
*** 681,686 ****
--- 681,687 ----
if (isset($json_parsed)){
array_push($json_parsed->comments, $commentObject);
}else {
+ $json_parsed = new stdClass;
$json_parsed->comments = array($commentObject);
}
$comment_change = new stdClass;