• 1.2.1 a97911a978

    v1.2.1 Stable

    javier released this 2026-06-05 09:47:38 +00:00 | 5 commits to main since this release

    1.2.1

    Release date: 2026-06-05

    Fixed

    • Infinite recursion on image uploadwp_update_post() (called to update the attachment GUID after S3 upload) was firing the edit_attachment WordPress action, which re-triggered the upload method, which called wp_update_post() again, creating infinite recursion. Xdebug killed the process at 512 stack frames, WordPress reported "The server cannot process the image". Fixed by: (1) removing the edit_attachment hook — wp_update_attachment_metadata covers all new-upload scenarios; (2) adding a static re-entry guard ($in_progress per attachment ID) as a safety net.

    • Fatal error: fclose() on already-closed stream — The AWS SDK (via Guzzle) closes file streams automatically after reading them for upload. The finally block was attempting to fclose() streams that were already closed, throwing TypeError: fclose(): Argument #1 ($stream) must be an open stream resource. Fixed by checking is_resource($fh) before calling fclose().

    Compatibility

    • WordPress: 4.1 - 7.1
    • PHP: 8.1 - 8.5

    Tests

    • PHP Coding Standards: 3.13.5 (0 errors)
    • WordPress Coding Standards: 3.3.0 (0 violations)
    • PHPStan: Level 9, 0 errors
    • PHPUnit: 22 tests, 54 assertions
    Downloads