Since PHP8, optional parameters before required ones are deprecated, which is used in ckeditor_link_url function. Hook hook_ckeditor_link_TYPE_url has first parameter required, so it is safe to assume, it can be required in ckeditor_link_url.

Comments

Mulambo created an issue. See original summary.

mulambo’s picture

solideogloria’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Category: Support request » Bug report
Status: Needs review » Reviewed & tested by the community

Looks good to me.

ronino’s picture

Works for me, too.

nedjo’s picture

Issue tags: +PHP 8.0

Tagging with PHP 8.0.

freeform.steph’s picture

Is the zip file of the dev branch possibly out of sync with the composer version? In the zip file, the line to change is:

function ckeditor_link_url($path = NULL, $langcode = LANGUAGE_NONE, $options = array()) {

however the patch specifies the following, and therefor fails:

function ckeditor_link_url($path = NULL, $langcode, $options = array()) {

aubjr_drupal’s picture

Just came across this.

@freeform.steph - The ZIP file must be returning the latest dev verison because an alternate fix already went into the dev branch. See https://git.drupalcode.org/project/ckeditor_link/-/commit/623db1af26631d.... That's what you're seeing.

The already committed fix should be the one to use, while this ticket should probably be belatedly closed as a duplicate.