Can't update extensions in 13.0.0RC3 #1499

Closed
opened 2026-10-05 00:46:09 +02:00 by adam · 0 comments
Owner

Was getting the following error when trying to update my extensions:

[Tue Sep 06 11:33:23.152166 2022] [php:info] [pid 2466] [client 192.168.1.250:64629] PHP Deprecated: Implicit conversion from float 1662482003.152163 to int loses precision in /data/photos/software/piwigo/include/Logger.class.php on line 367

I patched this on my system, fix below:

--- piwigo/include/Logger.class.php.orig        2022-09-06 11:35:08.660271896 -0500
+++ piwigo/include/Logger.class.php     2022-09-06 11:34:18.356824710 -0500
@@ -364,7 +364,7 @@
   {
     $originalTime = microtime(true);
     $micro = sprintf('%06d', ($originalTime - floor($originalTime)) * 1000000);
-    $date = new DateTime(date('Y-m-d H:i:s.'.$micro, $originalTime));
+    $date = new DateTime(date('Y-m-d H:i:s.'.$micro, intval($originalTime)));
     return $date->format($this->options['dateFormat']);
   }

Was getting the following error when trying to update my extensions: `[Tue Sep 06 11:33:23.152166 2022] [php:info] [pid 2466] [client 192.168.1.250:64629] PHP Deprecated: Implicit conversion from float 1662482003.152163 to int loses precision in /data/photos/software/piwigo/include/Logger.class.php on line 367 ` I patched this on my system, fix below: ``` --- piwigo/include/Logger.class.php.orig 2022-09-06 11:35:08.660271896 -0500 +++ piwigo/include/Logger.class.php 2022-09-06 11:34:18.356824710 -0500 @@ -364,7 +364,7 @@ { $originalTime = microtime(true); $micro = sprintf('%06d', ($originalTime - floor($originalTime)) * 1000000); - $date = new DateTime(date('Y-m-d H:i:s.'.$micro, $originalTime)); + $date = new DateTime(date('Y-m-d H:i:s.'.$micro, intval($originalTime))); return $date->format($this->options['dateFormat']); } ``` <!-- github-sync-id:1363548792 -->
adam closed this issue 2026-10-05 00:46:09 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1499