1
Galera is giving a strange error in my code, there is the value in the session but it informs this message.
[Wed Sep 02 13:55:17 2015] [error] [client 192.168.1.105] PHP Fatal error: main() [Function.main]: The script tried to execute a method or access a Property of an incomplete Object. Please ensure that the class Definition "Usuarioid" 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 /opt/lampp/htdocs/Renan/suc_validacao.php on line 11, referer: http://127.0.0.1:58889/http-services/Emulator-webserver/ripple/userapp/x/C/Users/hotsystems/Appdata/Local/XDK/xdk-scratchdir/b9796bb6-a6c6-4479-94a3-7154a6043f83/Platforms/android/Assets/www/index.html
My class
<?php
/* Declara o bloco de definições do usuário logado SUC */
if (!class_exists('UsuarioID')) {
class UsuarioID {
public $COD_IDENT_USUAR = -9999;
public $COD_IDENT_IGREJ = -9999;
public $TXT_NOMEX_USUAR = 'Anônimo';
function setCOD_IDENT_USUAR($p_COD_IDENT_USUAR) {
$this->COD_IDENT_USUAR = $p_COD_IDENT_USUAR;
}
function getCOD_IDENT_USUAR() {
return $this->COD_IDENT_USUAR;
}
function setCOD_IDENT_IGREJ($p_COD_IDENT_IGREJ) {
$this->COD_IDENT_IGREJ = $p_COD_IDENT_IGREJ;
}
function getCOD_IDENT_IGREJ() {
return $this->COD_IDENT_IGREJ;
}
function setTXT_NOMEX_USUAR($p_TXT_NOMEX_USUAR) {
$this->TXT_NOMEX_USUAR = $p_TXT_NOMEX_USUAR;
}
function getTXT_NOMEX_USUAR() {
return $this->TXT_NOMEX_USUAR;
}
function sair() {
$this->COD_IDENT_USUAR = -9999;
$this->COD_IDENT_IGREJ = -9999;
$this->TXT_NOMEX_USUAR = "Anônimo";
}
}
}
?>
I have tried to implement the __Sleep method I have tried to serialize(); but in both cases it did not work, which may be more ?
You probably put some object in this session. I think this can be fixed if the object implements the magic methods
__wakeup
and__sleep
– Wallace Maxters
I could give you an answer as an example ?
– Renan Rodrigues
Take a look at the answers to this question: http://answall.com/questions/75109/o-que-%C3%A9-essa-tal-classe-php-incomplete-class
– Wallace Maxters
How would this look in my case ?
– Renan Rodrigues