Skip to content

Commit

Permalink
Merge pull request #1607 from WordPress/fix/deprecated-notice
Browse files Browse the repository at this point in the history
Add ReturnTypeWillChange attribute for offsetGet to suppress notice
  • Loading branch information
westonruter authored Oct 20, 2024
2 parents 810673d + 6d105f1 commit 7eccb23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/optimization-detective/class-od-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public function offsetExists( $offset ): bool {
* @param mixed $offset Key.
* @return mixed May return any value from ElementData including possible extensions.
*/
#[ReturnTypeWillChange]
public function offsetGet( $offset ) {
return $this->data[ $offset ] ?? null;
}
Expand Down

0 comments on commit 7eccb23

Please sign in to comment.