Kiwi Chris Posted March 25, 2021 Posted March 25, 2021 With latest stable or later version of ProcessWire, PHP 7.4x I'm getting error: Call to a member function getDefault() on null 841: $langName = $this->wire('languages')->getDefault()->name; I don't have multi-language support installed so I'm not sure if this has anything to do with it?
Klenkes Posted April 17, 2021 Posted April 17, 2021 @kixe Thank you for this module! It saved me countless hours(probably days) of pain. 2
markus_blue_tomato Posted April 20, 2021 Posted April 20, 2021 If anyone needs this field in ProcessGraphQL, I built a support module for it: https://github.com/blue-tomato/GraphQLFieldtypeSelectExtOption 1
kixe Posted May 20, 2021 Author Posted May 20, 2021 On 3/25/2021 at 2:35 AM, Kiwi Chris said: With latest stable or later version of ProcessWire, PHP 7.4x I'm getting error: Call to a member function getDefault() on null 841: $langName = $this->wire('languages')->getDefault()->name; I don't have multi-language support installed so I'm not sure if this has anything to do with it? Thanks. fixed. 1
cst989 Posted December 17, 2024 Posted December 17, 2024 Ran into a little bit of an odd issue with this, but not sure if this module is to blame, or PW. I've found when saving blank values in php 8.3 - which includes the initial save that happens when making a new page - you hit this error with a core PW file Fatal Error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in wire/core/FieldtypeMulti.php:257 This happens even though the field I've made is a single "select" type This is a pretty common php 8 issue I believe, which could presumably be changed by fixing if(!count($values)) { to if(empty($values)) { but I wouldn't say I was a php expert enough to be confident in the potential repercussions of this, nor whether this is something that should even be changed in PW since it only seems to get tripped up by this module.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now