• Resolved derrick_w

    (@derrick_w)


    Error emitted following click on ‘Save’ a scheduled monthly backup, in WP 6.1.1 and BackupGuard 1.6.14.1

    PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - int in <path>/wp-content/plugins/backup/com/core/schedule/SGScheduleAdapterWordpress.php:78

    PHP 8 got stricter on typing, so maybe line 73 should include a cast (int). Would have included code here, but the input form won’t let me paste.

    • This topic was modified 2 years, 2 months ago by derrick_w. Reason: wrong line number
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Support Backup Guard

    (@backup-guard)

    Dear @derrick_w ,

    Thanks for reporting an issue.

    May we assume, that the issue with saving the schedule of the backups is connected with the PHP 8?
    If so, have you tried to save the schedule with the lower version of the PHP to see if the issue remains?
    Kindly ask you to give it a try and get back to us with some details, so we can assist accordingly.

    Thanks,

    BackupGuard Team

    Thread Starter derrick_w

    (@derrick_w)

    Let’s not assume. The system in use at the time of the OP was PHP 8.0.0 by FastCGI on IIS 7.5 on win 7 32-bit. Sorry, I don’t have an older version (7.x) of php to test with. Shall we talk about BG’s support for php 8.x+?

    At the time of the original post, I did not realize that regardless of the standard php error handler stopping processing, at least toggling the cloud destination was still saved.

    I can confirm com\core\schedule\SGScheduleAdapterWordpress.php line 73 edited thusly:

    $dayOfInterval = (int) $cron['dayOfInterval']; # added cast to int

    makes my BackupGuard happier on my php 8.0.

    Thread Starter derrick_w

    (@derrick_w)

    Oops. Same fatal error on LiteSpeed x64 php8 BG 1.6.15, but thankfully also the same fix, (int) cast, stated above.

    Plugin Support Support Backup Guard

    (@backup-guard)

    Dear @derrick_w ,

    Thanks for getting back to us.

    Upon checking the issue with our tech team, it turned out, that the issue with the PHP 8 will be solved during our upcoming update.

    Sorry for the inconvenience and thanks for reporting again.

    Best,

    BackupGuard Team

    Thread Starter derrick_w

    (@derrick_w)

    Thank you

    Plugin Support Support Backup Guard

    (@backup-guard)

    Dear @derrick_w ,

    You’re welcome ??
    If anything else comes up, just let us know.

    Best,

    BackupGuard Team

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Fatal error: Uncaught TypeError: Unsupported operand types: string – int’ is closed to new replies.