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

sendRedirect method parameter $type is deprecated #198

Open
patrickatwsrn opened this issue Jan 4, 2021 · 0 comments
Open

sendRedirect method parameter $type is deprecated #198

patrickatwsrn opened this issue Jan 4, 2021 · 0 comments

Comments

@patrickatwsrn
Copy link

patrickatwsrn commented Jan 4, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant