Skip to content

Commit

Permalink
sync: Explicitly cast an int variable when building SQL (#33535)
Browse files Browse the repository at this point in the history
Should already have been verified by the caller, but doesn't hurt to add
an explicit cast.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6472518243
  • Loading branch information
anomiex authored and matticbot committed Oct 10, 2023
1 parent 231ab51 commit 6dc8851
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 112 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"automattic/jetpack-search": "^0.39.1-alpha",
"automattic/jetpack-stats": "^0.6.5",
"automattic/jetpack-status": "^1.18.5",
"automattic/jetpack-sync": "^1.57.3",
"automattic/jetpack-sync": "^1.57.4-alpha",
"automattic/jetpack-plugins-installer": "^0.2.5"
},
"require-dev": {
Expand Down
5 changes: 5 additions & 0 deletions jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.57.4-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

## [1.57.3] - 2023-09-28
### Removed
- Remove compatibility code for PHP <5.5. [#33288]
Expand Down Expand Up @@ -934,6 +938,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages: Move sync to a classmapped package

[1.57.4-alpha]: https://github.com/Automattic/jetpack-sync/compare/v1.57.3...v1.57.4-alpha
[1.57.3]: https://github.com/Automattic/jetpack-sync/compare/v1.57.2...v1.57.3
[1.57.2]: https://github.com/Automattic/jetpack-sync/compare/v1.57.1...v1.57.2
[1.57.1]: https://github.com/Automattic/jetpack-sync/compare/v1.57.0...v1.57.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '1.57.3';
const PACKAGE_VERSION = '1.57.4-alpha';

const PACKAGE_SLUG = 'sync';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ public function get_min_max_object_id( $id_field, $object_table, $where, $bucket
// With a limit present, we'll look at a dataset consisting of object_ids that meet the constructs of the $where clause.
// Without a limit, we can use the actual table as a dataset.
$from = $bucket_size ?
"( SELECT $distinct_sql $id_field FROM $object_table $where_sql ORDER BY $id_field ASC LIMIT $bucket_size ) as ids" :
"( SELECT $distinct_sql $id_field FROM $object_table $where_sql ORDER BY $id_field ASC LIMIT " . ( (int) $bucket_size ) . ' ) as ids' :
"$object_table $where_sql ORDER BY $id_field ASC";

return $wpdb->get_row(
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
),
'jetpack-sync' => array(
'path' => 'jetpack_vendor/automattic/jetpack-sync',
'ver' => '1.57.3',
'ver' => '1.57.4-alpha1696957534',
),
),
);
52 changes: 26 additions & 26 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "4bcdb0595ddd64f17668dda2a2fefc7bbfc646e6"
"reference": "e2097c9550dcd90cbe97f2b244f8baf7768ee34d"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -57,7 +57,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "63267a74f0a29ca620b79a78d2a3843dccc8e8bc"
"reference": "995c481677d7068cb3559eadc5c88db76c44f640"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -119,7 +119,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "b0247907f106490aec2d5eed54b0c9a16ea81663"
"reference": "a226d550b9a49c96d4d8b53276ace726260d0f54"
},
"require": {
"automattic/jetpack-constants": "^1.6.23"
Expand Down Expand Up @@ -187,7 +187,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "8f320a973dd5a10f6f19ae2b74af8ea67fd12901"
"reference": "5f2c100165a1c210c144cb438cc3f31d7f467c53"
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0"
Expand Down Expand Up @@ -252,7 +252,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "3fa9a33f2b9bcfbce26025d6e91af13f0fe77eaa"
"reference": "22ea0d6b28a57ae2fb2f99e40b372afe5a6f5e8a"
},
"require": {
"composer-plugin-api": "^2.1.0"
Expand Down Expand Up @@ -311,7 +311,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "655d7342f3f92713721e6cab0475addcba5b271c"
"reference": "70055e5d0878853fb8f3f8d2de6bc8a1209bdc4a"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11"
Expand Down Expand Up @@ -353,7 +353,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "77bfafda876311739b8bb021a37390ef72736b99"
"reference": "c48a5a4d10d74566f3c0d36a12bdd9960c47d9bb"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22",
Expand Down Expand Up @@ -431,7 +431,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "739485831b8434cde8e6804b75baa4abf9bf2440"
"reference": "937ca8374ab2992419cf1a49bbbbdac2b3872d91"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -482,7 +482,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "3cc2ed5ad16339816f8fc131450992d0f57f8f2f"
"reference": "07c9f55f183bc9095a7388f8ed4f46c5b07445d4"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -532,7 +532,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-identity-crisis",
"reference": "bb69df84a888c4e3314484b9937c202472c6e597"
"reference": "db31d383c5edbd82bccc98fd7fe726e22b528305"
},
"require": {
"automattic/jetpack-assets": "^1.18.12-alpha",
Expand Down Expand Up @@ -610,7 +610,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "51db57515bb3a736b7472607563881feafa4ac1a"
"reference": "ed6c5ab97bfd30549c229a9ffa7fe04fd0f7488f"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -665,7 +665,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "13d2ecfa9fa3ee39933e95901e87740573e0d57a"
"reference": "46579497f84b318f50644bb1b7aa43f710468cc7"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22",
Expand Down Expand Up @@ -740,7 +740,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "4648642c28f9c46241a7522cdb4131df8b7a2953"
"reference": "5669dd538bbd4b171ac65e073c31279ab96a89c7"
},
"require": {
"automattic/jetpack-connection": "^1.58.1-alpha"
Expand Down Expand Up @@ -801,7 +801,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "6d556838fb07967315b09370ccc28202fb3d97c9"
"reference": "077be2a52d65b0a9bde40cb631f2a6eeea24a577"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -851,7 +851,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "530b12bea7105a27df20b60f5afc78c35fc74b3d"
"reference": "5f56862be6bf723165f992aa6051ca803478d637"
},
"require": {
"automattic/jetpack-admin-ui": "^0.2.23",
Expand Down Expand Up @@ -941,7 +941,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-partner",
"reference": "02750df96c3d1b6206f25eb61f2bde696a2eac5b"
"reference": "7e78ad9868a3d1c47fb4a75d0966fca84195e42c"
},
"require": {
"automattic/jetpack-connection": "^1.58.1-alpha",
Expand Down Expand Up @@ -1003,7 +1003,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "97d4ea48dadce97b2eab791508b424dfe47f25a0"
"reference": "bd7ad06e5bfad774490130bfcf525497ad1672e7"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -1061,7 +1061,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "d3d38f577a413746117be5beb1fe5e08d58aa486"
"reference": "6a5f10aec4dc7bd6ed1ca81095eae5c36cb1773a"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22"
Expand Down Expand Up @@ -1115,7 +1115,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "ed53986fca9c8b76a61f18ee96f808ab596add79"
"reference": "9a719abe67e0ffc4ba35eeda5de09dd9d428e556"
},
"require": {
"automattic/jetpack-status": "^1.18.5"
Expand Down Expand Up @@ -1169,7 +1169,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "e8ddf9440f61e3a46074009a23403867596fe9a2"
"reference": "454a38a47fb6ec1fd443a61ad8c70c9e2f8c88d9"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -1220,7 +1220,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
"reference": "1498653ff474c683c787a8540bc2175ebccda623"
"reference": "d7b3e7316bbad738df939237ee162f2fc155624f"
},
"require": {
"automattic/jetpack-assets": "^1.18.12-alpha",
Expand Down Expand Up @@ -1306,7 +1306,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
"reference": "3a6763104dfe8deeb3a0477a129be71bea1bde2e"
"reference": "15c4a6056edd5a5f95bffbdf7e751e2c2840fd3e"
},
"require": {
"automattic/jetpack-assets": "^1.18.12-alpha",
Expand Down Expand Up @@ -1370,7 +1370,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "d44dd05c9e04d611733b2b0dfd6fad52e90a7160"
"reference": "c67491010eb83002e20a67d8603c98a25e57042f"
},
"require": {
"automattic/jetpack-constants": "^1.6.23"
Expand Down Expand Up @@ -1420,12 +1420,12 @@
},
{
"name": "automattic/jetpack-sync",
"version": "1.57.3",
"version_normalized": "1.57.3.0",
"version": "1.57.4-alpha.1696957534",
"version_normalized": "1.57.4.0-alpha1696957534",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "5e09e9f5e450686ebc2dd6f575602d31c3c9433f"
"reference": "c7d549c6c08d6affa5fc5fbb6417957ae2cb3e3b"
},
"require": {
"automattic/jetpack-connection": "^1.58.1-alpha",
Expand Down
Loading

0 comments on commit 6dc8851

Please sign in to comment.