Skip to content

Commit

Permalink
fix a couple of deprecated warnings that appear in logs in newer php …
Browse files Browse the repository at this point in the history
…versions
  • Loading branch information
jonathanstegall committed May 18, 2024
1 parent 10825a8 commit 8c73fae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/class-object-sync-sf-mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,8 @@ public function get_failed_object_maps() {
$items_per_page = (int) get_option( $this->option_prefix . 'errors_per_page', 50 );
$current_error_page = isset( $_GET['error_page'] ) ? (int) $_GET['error_page'] : 1;
$offset = ( $current_error_page * $items_per_page ) - $items_per_page;
$all_errors = $this->wpdb->get_results( "SELECT * FROM ${table} WHERE salesforce_id LIKE 'tmp_sf_%' OR wordpress_id LIKE 'tmp_wp_%' OR last_sync_status = 0 LIMIT ${offset}, ${items_per_page}", ARRAY_A );
$errors_total = $this->wpdb->get_var( "SELECT COUNT(`id`) FROM ${table} WHERE salesforce_id LIKE 'tmp_sf_%' OR wordpress_id LIKE 'tmp_wp_%' OR last_sync_status = 0" );
$all_errors = $this->wpdb->get_results( "SELECT * FROM {$table} WHERE salesforce_id LIKE 'tmp_sf_%' OR wordpress_id LIKE 'tmp_wp_%' OR last_sync_status = 0 LIMIT {$offset}, {$items_per_page}", ARRAY_A );
$errors_total = $this->wpdb->get_var( "SELECT COUNT(`id`) FROM {$table} WHERE salesforce_id LIKE 'tmp_sf_%' OR wordpress_id LIKE 'tmp_wp_%' OR last_sync_status = 0" );
$errors['total_pages'] = ceil( $errors_total / $items_per_page );
$errors['pagination'] = paginate_links(
array(
Expand Down
2 changes: 1 addition & 1 deletion classes/class-object-sync-sf-queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function get_frequency( $name, $unit ) {
$minutes = 0;
}

$total = ${$unit} * $schedule_number;
$total = $$unit * $schedule_number;

return $total;
}
Expand Down

0 comments on commit 8c73fae

Please sign in to comment.