Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is de
-
The warning is thrown because you are calling
trailingslashit($abs_home_url_obj->getPath())
without checking if$abs_home_url_obj->getPath()
is nullThe warning is thrown at line 511 in translatepress-multilingual/includes/class-url-converter.php
The line reads:
$new_url_obj->setPath(trailingslashit(trailingslashit($abs_home_url_obj->getPath()) . trailingslashit($this->get_url_slug($language)) . $abs_home_considered_path));
But should probably be changed to:
$new_url_obj->setPath(trailingslashit(trailingslashit(strval($abs_home_url_obj->getPath())) . trailingslashit($this->get_url_slug($language)) . $abs_home_considered_path));
When I make this change the warning disappears.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is de’ is closed to new replies.