Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

sendRedirect method parameter $type is deprecated #198

@patrickatwsrn

Description

@patrickatwsrn

Hi, found two deprecated in my error log:

/var/www/vhosts/venicebeach-fitness.de/httpdocs/modx/core/cache/includes/elements/modplugin/33.include.cache.php : 298) sendRedirect method parameter $type is deprecated since version 2.0.5. Use type in options array instead.

/var/www/vhosts/venicebeach-fitness.de/httpdocs/modx/core/cache/includes/elements/modplugin/33.include.cache.php : 298) sendRedirect method parameter $responseCode is deprecated since version 2.0.5. Use responseCode in options array instead.

This releates to line 298 in StercSEO PLugin

            $modx->sendRedirect($url, 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');

Current version of $modx->sendRedirect documented here:

https://docs.modx.com/current/en/extending-modx/modx-class/reference/modx.sendredirect

void sendRedirect (string $url, [array $options = false], [string $type = ''], [string $responseCode])

I guess this is how it should look like:

$modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));

SeoTab 2.3.3
MODX 2.7.3

Cheers,

pepebe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions