Skip to content

J4 Helix 3 Php8 Gives Error: array_replace(): Argument #2 () Must Be Of Type Array, String Given #111

@ghost

Description

Bug description

helix3.php uses wrong arguments for addStyleSheet() in Line 642 and 648.

self::getInstance()->document->addStyleSheet(JURI::base(true) . '/templates/' . $template . '/css/' . $src, 'text/css', null, $attribs);

self::getInstance()->document->addStyleSheet($src, 'text/css', null, $attribs);

With PHP7.x and Joomla3 this does not impact anything, but if the user upgrades to Joomla4 and PHP8 he will get a error message.

Steps to reproduce

  • setup a server instance with php8.x
  • setup a new joomla4 instance
  • install helix 3
  • set helix3 as default
  • check the frontpage

Expected behavior

No error exception should be thrown.

Screenshots

Screenshot_20220127_151900

Environment

  • Ubuntu server minimal 20.04 LTS
  • PHP 8.x
  • Apache 2.4
  • Mysql 5.x+
  • Joomla 4

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