Loading...
 
Skip to main content

Preference multiselect returning string instead of array

Status
Closed
Subject
Preference multiselect returning string instead of array
Version
21.x
Category
  • Regression
Feature
User Preferences
Resolution status
New
Submitted by
drsassafras
Lastmod by
drsassafras
Rating
(0)
Description

When a multiselect preference is saved it gets encoded in the database so it can be retrieved as an array.

The preference is sometimes not encoded into an array and instead returned as a string. I have not narrowed down under what conditions it does this, but have found that it often works, and only sometimes returns a string. It appears to go for periods where it will return an array and others where it will return a string.

Fatal error: Uncaught TypeError: Argument 1 passed to Language::findLanguageNames() must be of the type array, string given, called in /var/www/virtual/tiki.ocr.suite.wiki/html/tiki-upload_file.php on line 88 and defined in /var/www/virtual/tiki.ocr.suite.wiki/html/lib/language/Language.php:671 Stack trace: #0 /var/www/virtual/tiki.ocr.suite.wiki/html/tiki-upload_file.php(88): Language->findLanguageNames('a:1:{i:0;s:3:"e...') #1 {main} thrown in /var/www/virtual/tiki.ocr.suite.wiki/html/lib/language/Language.php on line 671

Solution
works for me
Importance
9
Priority
45
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7126
Created
Wednesday 10 July, 2019 21:53:24 UTC
by drsassafras
LastModif
Wednesday 02 October, 2019 23:44:03 UTC


Show PHP error messages