TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Drupal\media_entity_link\Form\LinkMediaLibraryAddForm::validateUriElement() cannot be called statically in call_user_func_array() on PHP 8 when adding media entity link

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kensae created an issue. See original summary.

kensae’s picture

I've created a patch to make the function validateUriElement static.

kensae’s picture

Title: TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Drupal\media_entity_link\Form\LinkMediaLibraryAddForm::validateUriElement() cannot be called statically in call_user_func_array() » Drupal\media_entity_link\Form\LinkMediaLibraryAddForm::validateUriElement() must be static
kensae’s picture

Issue summary: View changes
kensae’s picture

Assigned: kensae » Unassigned
Status: Active » Needs review
tijsdeboeck’s picture

Title: Drupal\media_entity_link\Form\LinkMediaLibraryAddForm::validateUriElement() must be static » PHP8 error: Drupal\media_entity_link\Form\LinkMediaLibraryAddForm::validateUriElement() must be static
kensae’s picture

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works for me.

dishabhadra made their first commit to this issue’s fork.

dishabhadra’s picture

Status: Reviewed & tested by the community » Fixed
dishabhadra’s picture

Thank you, everyone for your valuable contributions.. I've successfully applied it and incorporated it into both the 2.0.x and 1.0.x branches, ensuring a Drupal 8 and Drupal 10 compatible release of the module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.