Optional arguments are sometimes missing ?
in the type.
#1393
Labels
maybe bug
Potential bug, to be investigated
?
in the type.
#1393
Describe the bug
qtranxf_convertURL
causes a fatal error if invoked with a$url
ofnull
To Reproduce
Steps to reproduce the behavior:
functions.php
:Expected behavior
I'd expect no error
Proposed Fix
In PHP >= 8, optional arguments need to be typed using
?string
,?bool
and so forth. So we should changeqtranxf_convertURL
(and many other functions in qtranslate-xt) from this:...to this:
ChatGPT can explain the issue much clearer:
Debug info
Go to
<YOUR_SITE>/wp-admin/options-general.php?page=qtranslate-xt#troubleshooting
.Press
Collect information
button and copy/paste the output below.Additional context
Here's the stack trace where I originally encountered the error. It seems to be related with Yoast SEO somehow.
The text was updated successfully, but these errors were encountered: