Problem/Motivation
TypeError: Drupal\quicktabs\Plugin\views\style\Quicktabs::getSetMapping(): Return value must be of type bool, array returned in Drupal\quicktabs\Plugin\views\style\Quicktabs->getSetMapping() (line 99 of modules/contrib/quicktabs/src/Plugin/views/style/Quicktabs.php).
Steps to reproduce
Update module to 4.0.1, go to a view that uses Quick Tabs.
Proposed resolution
Create a PR
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Screenshot 2025-09-09 at 3.47.37 PM.png | 63.85 KB | kurt.j |
| #8 | Screenshot from 2025-03-20 12-58-30.png | 125.86 KB | uttam |
| #8 | Screenshot from 2025-03-20 12-56-03.png | 258.37 KB | uttam |
Issue fork quicktabs-3514046
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
themic8 commentedComment #4
themic8 commentedComment #5
themic8 commentedComment #6
uttam commentedThis patch resolves a TypeError in
Quicktabs::getSetMapping()by changing the return type from bool to array, ensuring it accurately reflects the actual return value ($this->setMapping), which is always an array; this prevents runtime error which was occuring by type mismatch, enforces strict type safety as required in PHP 7+ and PHP 8+Hence, Moving the state of the issue to RTBC.
Comment #7
uttam commentedComment #8
uttam commentedComment #11
joelpittetThanks for catching that, I have committed the code.
Comment #13
kurt.j commentedSorry, but this is not fixed. I just updated to this version and get this "value must be of type bool, array returned" error. I checked the code base for 4.0.1 and the return value is still set to bool in the getSetMapping() function code. I will apply the patch in the mean time. But just wanted to let you know that this is not fixed. Thanks!