View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] count(): Parameter must be an array or an object that implements Countable - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)


Jeudi 7 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

18 et 19 juin (9h - 12h30)

 
 

Administrez avec ProjeQtOr

25 et 26 juin (9h - 12h30)

 

 

 

[SOLVED] count(): Parameter must be an array or an object that implements Countable

More
23 Juil 2020 12:49 - 23 Juil 2020 12:55 #1 by ma_bou
Hello,

I've stumbled upon the error specified in the subjet when I first tried to copy a project after updating to the latest version (8.5.2)

Here's what the log says:

2020-07-23 06:40:01.564


DEBUG
=>/tool/projeqtor.php at line 1634 calling debugPrintTraceStack()
2020-07-23 06:40:01.564
DEBUG
=> calling projeqtorAutoload()
2020-07-23 06:40:01.564
DEBUG
=> calling spl_autoload_call()
2020-07-23 06:40:01.564
DEBUG
=> /model/persistence/SqlList.php at line 55 calling property_exists()
2020-07-23 06:40:01.564
DEBUG
=>/model/persistence/SqlElement.php at line 2160 calling SqlList:getList()
2020-07-23 06:40:01.564
DEBUG
=> /model/persistence/SqlElement.php at line 997 calling SqlElement:copySqlElementTo()
2020-07-23 06:40:01.564
DEBUG
=> /model/ProjectMain.php at line 1289 calling SqlElement:copyTo()
2020-07-23 06:40:01.565
DEBUG
=>/tool/copyProjectTo.php at line 129 calling ProjectMain:copyTo()
2020-07-23 06:40:01.565
DEBUG
WARNING : SqlElement::fetchList() called for not valid class 'ProjectPlanningMode'
2020-07-23 06:40:01.565 ***** ERROR ***** [V8.5.2] ERROR *****
2020-07-23 06:40:01.565 ***** ERROR ***** [V8.5.2] on file '/model/persistence/SqlElement.php' at line (2161)
2020-07-23 06:40:01.565 ***** ERROR ***** [V8.5.2] cause = count(): Parameter must be an array or an object that implements Countable


Thanks in advance for your help

Edit: I've tried to copy a single element without any problem.
Last edit: 23 Juil 2020 12:55 by ma_bou.
The topic has been locked.
More
23 Juil 2020 16:17 - 23 Juil 2020 16:37 #2 by babynus
Hi,

Issue confirmed.
Fix is to replace line 2161 in projeqtor/model/SqlElement.php from
if (count($lst>0)) {
to
if (count($lst)>0) {

[EDIT]
Must also add lines before line 1526 on same file :
if (!property_exists($oldObject,$col_name)) {
          continue; 
        }
        $col_old_value = $oldObject->$col_name;

We'll soon deploy a patch

Babynus
Administrator of ProjeQtOr web site
Last edit: 23 Juil 2020 16:37 by babynus.
The topic has been locked.
More
23 Juil 2020 18:02 #3 by ma_bou
Works like a charm.

Thanks for your quick reply!
The topic has been locked.
Moderators: babynusprotion
Time to create page: 0.044 seconds

Paramétrages de cookies

×

Cookies fonctionnels

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

Veuillez vous connecter pour voir vos activités!

Autres cookies

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