Commit 732e466
committed
Improve warning when we encounter an invalid EXPIRY in SET
We actually had two different bits of logic to handle EXPIRY values in
the `SET` command. One for the legacy `SET` -> `SETEX` mapping and
another for the newer `SET foo bar EX <expiry>`.
Additionally the error message could be confusing. Passing 3.1415 for
an `EX` expiry would fail as we didn't allow floats.
This commit consolidates expiry parsing to our existing helper function
as well as improves the `php_error_docref` warning in the event that the
user passes invalid data. The warning will now tell the user the type
they tried to pass as an EXPIRY to make it easier to track down what's
going wrong.
Fixes #24481 parent 37c5f8d commit 732e466
1 file changed
Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2291 | 2291 | | |
2292 | 2292 | | |
2293 | 2293 | | |
2294 | | - | |
2295 | | - | |
2296 | 2294 | | |
2297 | | - | |
| 2295 | + | |
| 2296 | + | |
2298 | 2297 | | |
2299 | 2298 | | |
| 2299 | + | |
2300 | 2300 | | |
2301 | 2301 | | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
2302 | 2307 | | |
2303 | 2308 | | |
2304 | 2309 | | |
2305 | 2310 | | |
2306 | 2311 | | |
2307 | 2312 | | |
2308 | 2313 | | |
| 2314 | + | |
2309 | 2315 | | |
2310 | 2316 | | |
2311 | 2317 | | |
| |||
2321 | 2327 | | |
2322 | 2328 | | |
2323 | 2329 | | |
2324 | | - | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
2325 | 2334 | | |
2326 | | - | |
2327 | 2335 | | |
2328 | | - | |
2329 | | - | |
2330 | | - | |
2331 | | - | |
2332 | | - | |
2333 | | - | |
2334 | | - | |
2335 | 2336 | | |
2336 | 2337 | | |
2337 | 2338 | | |
| |||
2345 | 2346 | | |
2346 | 2347 | | |
2347 | 2348 | | |
2348 | | - | |
2349 | | - | |
| 2349 | + | |
| 2350 | + | |
2350 | 2351 | | |
2351 | 2352 | | |
2352 | | - | |
2353 | | - | |
2354 | 2353 | | |
2355 | 2354 | | |
2356 | 2355 | | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
| 2356 | + | |
2361 | 2357 | | |
2362 | 2358 | | |
2363 | 2359 | | |
| |||
2396 | 2392 | | |
2397 | 2393 | | |
2398 | 2394 | | |
| 2395 | + | |
| 2396 | + | |
2399 | 2397 | | |
2400 | 2398 | | |
2401 | 2399 | | |
| |||
0 commit comments