View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] EXCEPTION - Class name must be a valid object or a string - ProjeQtOr
 
 

[SOLVED] EXCEPTION - Class name must be a valid object or a string

More
14 Jul 2020 12:39 #1 by avris
Hi,

In the logs I see:

***** ERROR ***** [V8.5.1] EXCEPTION *****
***** ERROR ***** [V8.5.1] on file '/***********/view/diary.php' at line (465)
***** ERROR ***** [V8.5.1] cause = Class name must be a valid object or a string
***** ERROR ***** [V8.5.1] => #0 /***********/view/diary.php (161) -> getAllActivities()
***** ERROR ***** [V8.5.1] => #1 /***********/view/diaryMain.php (321) -> include()


In function getAllActivities() I added a check for 0 value on refId while iterating $workList:
        foreach ($workList as $pw) {
          if ($pw->refId == 0)
                continue;
          $item=new $pw->refType($pw->refId);

Not sure this is the correct fix, but it resolved it for us.

Could you please indicate if this workaround is OK and/or provide a proper fix?

Thanks and regards,
Avri
The following user(s) said Thank You: babynus
The topic has been locked.
More
15 Jul 2020 12:16 #2 by babynus
Hi,

Thanks for pointing out the issue, and even more for posting a fix
We'll include some fix in V8.5.2.
Not exactly the same, we'll replace
if ($pw->refId == 0) continue;
with
if (!$pw->refType) continue;
which is a bit more accurate.

But what is strange is that you should never have a Planned Work without refType defined...
Possibily you could look for such lines in table plannedwork (line with refType null).
You can also try to execute the Concistency check on admistration form, maybe it can fix it.

Thanks

Babynus
Administrator of ProjeQtOr web site
The topic has been locked.
Moderators: babynusprotion
Time to create page: 0.028 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.