Support » Plugin: WP-Optimize - Clean, Compress, Cache. » Database error

  • Resolved Tofandel

    (@tofandel)


    In wp-optimize\vendor\team-updraft\common-libs\src\updraft-tasks\class-updraft-task.php on line 332

    You have the following syntax error

    
    $affected = $wpdb->query($wpdb->prepare("
    	UPDATE {$wpdb->base_prefix}tm_tasks
    	SET last_locked_at = %d'
    	WHERE id = %d
    	AND last_locked_at <= %s
    ", time(), $task_id, $expires_at));
    

    Notice the single quote after the %d but not before

    It causes errors during cron updates

    The correct code should be

    
    $affected = $wpdb->query($wpdb->prepare("
    	UPDATE {$wpdb->base_prefix}tm_tasks
    	SET last_locked_at = %d
    	WHERE id = %d
    	AND last_locked_at <= %s
    ", time(), $task_id, $expires_at));
    
    • This topic was modified 12 months ago by Tofandel.
Viewing 1 replies (of 1 total)
  • Plugin Support Marc Lacroix

    (@marcusig)

    Hi,

    Thanks for reporting this in detail! Appreciate it.
    We’ll fix this.

    Marc.

Viewing 1 replies (of 1 total)
  • The topic ‘Database error’ is closed to new replies.