Welcome Guest, Not a member yet? Register   Sign In
What is the meaning of std Class object ... + array
#1

[eluser]phpfresher[/eluser]
Need some suggestions????
#2

[eluser]WanWizard[/eluser]
need some more info????
#3

[eluser]CroNiX[/eluser]
Just guessing, but you are probably trying to iterate over an object or accessing its properties as if it were an array using array notation instead of object notation.

Like, if $my_object is an object with a property of 'setting' and you are trying to access it like $my_object['setting'] instead of $my_object->setting.
#4

[eluser]Sire[/eluser]
A common issue I've seen is the reverse of CroNIX's comment, "Creating default object from empty value"

An example where I've seen this is in the WordPress includes, user.php. An example:
Code:
$blog_id = get_current_blog_id();
        $blogs = array();
        $blogs[ $blog_id ]->userblog_id = $blog_id;

The solution is to create the default object first
Code:
$blog_id = get_current_blog_id();
        $blogs = array();
        $blogs[ $blog_id ] = new stdClass();  // this was added
        $blogs[ $blog_id ]->userblog_id = $blog_id;




Theme © iAndrew 2016 - Forum software by © MyBB