Skip to content

fix: do not read item id when floating controls have no item - #252

Merged
hellopablo merged 1 commit into
developfrom
fix/floating-controls-null-item
Sep 30, 2026
Merged

hellopablo merged 1 commit into
developfrom
fix/floating-controls-null-item

Conversation

@hellopablo

Copy link
Copy Markdown
Member

Summary

  • Floating controls always built notes data-id from $oItem->id, even on create screens where $oItem is null.
  • Last-modified already guards with !empty($oItem); notes attributes now skip data-id unless the item has an id.
  • Spotted on EZ-2377 podcast create (and the same warning on Article create).

Test plan

  • Open an admin create screen that uses floating controls (e.g. Article or Podcast create) and confirm there is no PHP warning about $oItem->id.
  • Open an existing item’s edit screen with notes enabled and confirm the Notes button still has data-id.
  • Save still works on both create and edit.

Create screens pass a null item, and PHP 8 warns on $oItem->id while notes attributes are always built.
@hellopablo
hellopablo merged commit 75497ae into develop Sep 30, 2026
5 checks passed
@hellopablo
hellopablo deleted the fix/floating-controls-null-item branch September 30, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant