mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-11-04 07:52:29 +01:00
pwg_unique_exec_begins() read the token back with a SELECT after its INSERT IGNORE. If the holder released the token in between, the SELECT returned no row and explode() received null: under parallel requests a "Deprecated: explode()" message ended up in front of the JSON response (reported by Eddy Lelièvre-Berna). The number of rows affected by the INSERT IGNORE now tells whether we got the token. A stale token is now removed only if it still holds the value we have seen, and pwg_unique_exec_ends() accepts the execution id: an execution which exceeded the timeout no longer releases the token of the call which took it over. Existing callers pass their execution id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vty6FTwtZ3ezEncagFo2FQ