• Resolved Jules Colle

    (@jules-colle)


    The warning is thrown because you are calling trailingslashit($abs_home_url_obj->getPath()) without checking if $abs_home_url_obj->getPath() is null

    The 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)
  • Hello,

    Thank you for reporting this.

    Can you tell us what PHP version do you use?
    This is needed to know on what version this appears.

    Cheers,

    Thread Starter Jules Colle

    (@jules-colle)

    Php 8.2

    There are some other depreciation warnings too. Is it okay if I report them in this forum as well?

    sandudenis

    (@sandudenis)

    Yes, include all the depreciation warning and we will sort them out, come with a fix for them as soon as possible.

    Thread Starter Jules Colle

    (@jules-colle)

    Alright, here are some more notices we get:

    • PHP Deprecated:? ob_start(): Passing null to parameter #2 ($chunk_size) of type int is deprecated in […]/includes/class-translation-render.php on line 49
    • PHP Warning:? Attempt to read property “id” on null in […]/includes/class-translation-render.php on line 902
    • PHP Warning:? Undefined array key “<strong>Shuttle</strong> vanaf de luchthaven: €50” in […]/includes/class-translation-render.php on line 902



    Plugin Support Alex

    (@alexcozmoslabs)

    We need to take the pulse of this ticket. Is it still relevant?
    In the meantime, I set this ticket as Resolved. You can also change its status back to unresolved and let us know by replying to this topic if your request still needs attention.
    However, we encourage you to leave this ticket as it is and open a new one where to mention the issue again and ask for support. You can mention the link to this thread in the new ticket.

    Thread Starter Jules Colle

    (@jules-colle)

    Yes we still get the deprecated notice. It doesn’t look like you made the suggested change yet.

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.