You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server (please complete the following information):
OS: Rocky Linux 9
PHP Version: 8.1.14
Z-Push Version: develop-2.6.2-164-g6458636d (cloned from github - 22/05/2023)
Backend: Zimbra
Smartphone (please complete the following information):
Device: Samsung Galaxy S21
OS: Android
Mail App: Samsung Email
Additional context
When contacts sync to the device, z-push is creating a Birthday event for every one in the Android calendar on today's date. I have 628 contacts syncing from the server and I have 628 all-day yearly events that were created
The problem appears to stem from the fix in streamer.php for a change in the behaviour of the function gmstrftime
The latest fix shows
// Handle empty string passed for PHP 8.x
if ('' === $ts) {
$ts = null;
}
prevents the function from failing when passed an empty string.
However, the passing of null to the gmstrftime results in it using the current date/time as the timestamp to be formatted.
The Contact Syncobject has anniversary and birthday fields which by default are empty strings.
So, when the exporter code requests that those fields be formatted, if they are not set in the server they will be assigned the datetime of the sync request instead of being returned as empty strings as was the pre-PHP8, and in this case the desired, behaviour.
It looks like the second to last commit against streamer.php was actually returning the empty string which I believe is the required outcome. Why was that commit superceeded?
I believe the correct fix is the previous version
// Handle empty string passed for PHP 8.x
if ('' === $ts) {
return $ts;
}
Vincent
The text was updated successfully, but these errors were encountered:
Looking at the the author of these commits https://github.com/sonersivri he is involved with Zextras, so these changes might have been related to their Zimbra version or fork.
Server (please complete the following information):
OS: Rocky Linux 9
PHP Version: 8.1.14
Z-Push Version: develop-2.6.2-164-g6458636d (cloned from github - 22/05/2023)
Backend: Zimbra
Smartphone (please complete the following information):
Device: Samsung Galaxy S21
OS: Android
Mail App: Samsung Email
Additional context
When contacts sync to the device, z-push is creating a Birthday event for every one in the Android calendar on today's date. I have 628 contacts syncing from the server and I have 628 all-day yearly events that were created
The problem appears to stem from the fix in streamer.php for a change in the behaviour of the function gmstrftime
The latest fix shows
prevents the function from failing when passed an empty string.
However, the passing of null to the gmstrftime results in it using the current date/time as the timestamp to be formatted.
The Contact Syncobject has anniversary and birthday fields which by default are empty strings.
So, when the exporter code requests that those fields be formatted, if they are not set in the server they will be assigned the datetime of the sync request instead of being returned as empty strings as was the pre-PHP8, and in this case the desired, behaviour.
It looks like the second to last commit against streamer.php was actually returning the empty string which I believe is the required outcome. Why was that commit superceeded?
I believe the correct fix is the previous version
Vincent
The text was updated successfully, but these errors were encountered: