Re: The script tried to execute a method or access a property of an incomplete object.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 1, 2010 at 9:49 PM, Rene Veerman <rene7705@xxxxxxxxx> wrote:
> Hi, i got this error that i can't figure out.. Maybe you can help;
>
> Notice: mbConfig(): The script tried to execute a method or access a
> property of an incomplete object. Please ensure that the class
> definition "classCoreDBtable" of the object you are trying to operate
> on was loaded _before_ unserialize() gets called or provide a
> __autoload() function to load the class definition in
> /media/500gb/data2/www/htdocs/work_myown/mediaBeez/php/lib_mediaBeez.php
> on line 540
>

I have a partial fix, thanks to
http://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties

function fixObject (&$object)
{
  if (!is_object ($object) && gettype ($object) == 'object')
    return ($object = unserialize (serialize ($object)));
  return $object;
}

I believe this to be a hack, to call this function to fix my objects.
But it gets me going again.
I'm still holding out for more tips though ;)


>
>
> lib_mediaBeez.php:540+;
> function mbConfig ($name) {
>
>        $value = null;
>
> 540:    if (class_exists('classCoreDBtable') &&
> isset($_SESSION["mb_site_preferences"]) &&
> is_array($_SESSION["mb_site_preferences"]->rec)) {
>
>                $sp = $_SESSION["mb_site_preferences"];
>
>                if (array_key_exists($name, $sp->rec)) $value = $sp->rec[$name];
>
>        }
>
>
>
>        //defaults required?
>
>        if (is_null($value)) {
>
>                switch ($name) {
>
>                case "sp_theme": $value="mediaBeez_default"; break;
>
>                case "sp_thumb_width" : $value="95"; break;
>
>                case "sp_thumb_height" : $value = "95"; break;
>
>                case "sp_midres_width" : $value="800"; break;
>
>                case "sp_midres_height" : $value = "600"; break;
>
>
>
>                case "sp_buttonTheme" : $value="orangeGreenBlue"; break;
>
>                case "sp_menu_theme" : $value="whiteBlue"; break;
>
> ............
>
> lib_mediaBeez.php:0;
> <?php
>
> require_once ("defines_mediaBeez.php");
> require_once ('core_db_table.php');
>
>
> ............
>
> So i do include the class, yet i get this error.
> Any clues will be much appreciated..
>
>
> --
> ---------------------------------
> Greetings from Rene7705,
>
> My free open source webcomponents:
>  http://code.google.com/u/rene7705/
>  http://mediabeez.ws/downloads (and demos)
>
> My music (i'm DJ firesnake)
>  http://mediabeez.ws/music
>
> http://www.facebook.com/rene7705
> ---------------------------------
>



-- 
---------------------------------
Greetings from Rene7705,

My free open source webcomponents:
  http://code.google.com/u/rene7705/
  http://mediabeez.ws/downloads (and demos)

My music (i'm DJ firesnake)
  http://mediabeez.ws/music

http://www.facebook.com/rene7705
---------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux