Skip to content

[BUG] Uncaught TypeError: array_slice(): Argument #3 ($length) must be of type ?int #773

@vendeeglobe

Description

@vendeeglobe

Version: 1.8

Description

WackoWiki feed action:
$feed->get_items($pagination['offset'], $max)

PHP Fatal error: Uncaught TypeError: array_slice(): Argument #3 ($length) must be of type ?int, string given in /lib/SimplePie/src/SimplePie.php:30..

Suggestion

$feed->get_items($pagination['offset'], (int) $max)

Maybe cast $end with (int) also in array_slice?

return array_slice($items, $start, (int) $end);

And check example code with get_items().

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions