Loading...
 
Skip to main content

Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack)

Status
Closed
Subject
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack)
Version
26.x
Category
  • Bug
  • Error
Feature
Perspectives
Resolution status
New
Submitted by
Kevin Doyle
Lastmod by
Kevin Doyle
Rating
(0)
Description

Clean install of tiki-26-0 php8.1.23 apache2 ubunut 22.04
After tiki setup completes eg lock installation and continue, I get a black webpage with this at the top

I wonder is some of the code not compliant with php8.1 the documentation mention arrays have to be a certain configuration:
Note:
Prior to PHP 8.0.0, square brackets and curly braces could be used interchangeably for accessing array elements (e.g. $array42 and $array{42} would both do the same thing in the example above). The curly brace syntax was deprecated as of PHP 7.4.0 and no longer supported as of PHP 8.0.0.
https://www.php.net/manual/en/language.types.array.phpQuestion


Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /var/www/tiki.squadron6.com/tiki-26.0/lib/perspective/binderlib.php:49 Stack trace: #0 /var/www/tiki.squadron6.com/tiki-26.0/lib/perspective/binderlib.php(49): in_array() #1 /var/www/tiki.squadron6.com/tiki-26.0/tiki-setup_base.php(662): AreasLib->getPerspectiveByObjectAndCategories() #2 /var/www/tiki.squadron6.com/tiki-26.0/tiki-setup_base.php(668): {closure}() #3 /var/www/tiki.squadron6.com/tiki-26.0/tiki-setup.php(66): require_once('...') #4 /var/www/tiki.squadron6.com/tiki-26.0/tiki-index.php(43): require_once('...') #5 {main} thrown in /var/www/tiki.squadron6.com/tiki-26.0/lib/perspective/binderlib.php on line 49

Solution
more than lightly a miss configuration
Workaround
finally got proper config
Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8533
Created
Monday 02 October, 2023 20:02:45 UTC
by Kevin Doyle
LastModif
Friday 06 October, 2023 01:26:13 UTC


Show PHP error messages