0
I have discovered a pretty minor issue; however, it results in a fatal error, so fixing it may be a good idea.
Joomla adds " 00:00:00" to the end of the date when opening an item to edit it.. This causes a fatal error because administrator/components/com_finances/models/item.php on line 101 the PHP uses the "Y-m-d" format.
For reference I am running EM 3.0.2, IM 2.0.1, IM/EM Plugin 1.0.2 and Joomla 3.5.1.
Joomla adds " 00:00:00" to the end of the date when opening an item to edit it.. This causes a fatal error because administrator/components/com_finances/models/item.php on line 101 the PHP uses the "Y-m-d" format.
For reference I am running EM 3.0.2, IM 2.0.1, IM/EM Plugin 1.0.2 and Joomla 3.5.1.
Responses (3)
-
Accepted Answer
-
Accepted Answer
0Hello Daniel,
I'm trying to reporduce the problem you are having. I can see the 00:00:00 in the date field when editting an expense from the backend. However, this isn't causing any problem to me when I save the expense.
Could you tell me when do you get the fatal error? Which action are you doing when it happens?
Thank you,
Joan -
Accepted Answer
0This is how I reproduce the problem.
1. I create a new item in expense manager. (The date field is filled with the current date by default. The default can be used or the date can be changed.)
2. Save the item. (Once the page reloads after the save the 00:00:00 is added to the end of the date.)
3. Click save again. This should result in the following message "Fatal error: Call to a member function format() on a non-object in /home/site/public_html/administrator/components/com_finances/models/item.php on line 101"
It can also be reproduced by manually typing anything other than a Y-m-d format and attempting to save. However, double digit years and single digit months and days are accepted, but returned after save in the standard Y-m-d format. Manual misentry causes the same error for End and Next recurrency date fields as well (errors on item.php lines 109 and 105 respectively). However, 00:00:00 is not added to the recurrency fields after save when entering the date correctly.
It can also be reproduced by deleting the date and attempting to save.
00:00:00 is not added on the frontend. Manually entering 00:00:00 on the frontend does not cause any error.
EM options are set to use the default date format "%Y-%m-%d".
I hope this helps.
Dan
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »