Welcome Guest, Not a member yet? Register   Sign In
session error
#1

(This post was last modified: 03-02-2023, 10:15 PM by zahid waseem.)

Please help how to solve

An uncaught Exception was encountered
Type: TypeError
Message: array_key_exists(): Argument #2 ($array) must be of type array, stdClass given
Reply
#2

(03-02-2023, 10:15 PM)zahid waseem Wrote: Please help how to solve

An uncaught Exception was encountered
Type: TypeError
Message: array_key_exists(): Argument #2 ($array) must be of type array, stdClass given

It looks like you're trying to test for the existence of an array key on an object. You'll want to use property_exists( $object, 'property' ), or isset($object->property). Note that property_exists() will return true even if the value of the property is null, while isset() will return false if the value is null. Note also that the order of arguments for property_exists() is reversed from array_key_exists() [gets me every other time].
Reply




Theme © iAndrew 2016 - Forum software by © MyBB