Skip to content

Warning in Integration\CoolUri (method extractArraysFromParams) #92

@aimcom

Description

@aimcom

Line 613 of Classes/Integration/CoolUri.php is source of a warning if there is an array in the GET parameters.

E.g. if there is a param like "&my_extension_plugin[action]=show".

The problem can be solved by adding an additional check before encoding the value.

This is a possible solution (replacement for the line foreach ($params as $k => $v) $params[$k] = $k . '=' . rawurlencode($v);):

foreach ($params as $param => $value) {
	if (!is_array($value)) {
		$params[$param] = $param . '=' . rawurlencode($value);
	} else {
		foreach ($value as $subParam => $subValue) {
			$params[$param] = $param . '[' . $subParam . ']=' . rawurlencode($subValue);
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions