Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning(2): strcmp() expects parameter 1 to be string, array given #8

Closed
yalgva opened this issue Sep 2, 2019 · 7 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@yalgva
Copy link

yalgva commented Sep 2, 2019

Hello Tomolimo,

This message appears every seconds in php error logs, thank you for your help

[2019-09-02 10:42:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in C:\inetpub\wwwroot\inc\toolbox.class.php line 659
*** PHP Warning(2): strcmp() expects parameter 1 to be string, array given
Backtrace :
:
plugins\impacts\inc\config.class.php:141 strcmp()
plugins\impacts\inc\impact.class.php:508 PluginImpactsConfig::getAssetList()
plugins\impacts\inc\impact.class.php:389 PluginImpactsImpact::dropdownAllDevices()
plugins\impacts\inc\impact.class.php:156 PluginImpactsImpact::showOppositeListForItem()
plugins\impacts\inc\impact.class.php:137 PluginImpactsImpact::showForItem()
inc\commonglpi.class.php:485 PluginImpactsImpact::displayTabContentForItem()
ajax\common.tabs.php:92 CommonGLPI::displayStandardTab()
{"user":"2430@GLPI02","mem_usage":"0.000", 2.89Mio)"}
[2019-09-02 10:42:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in C:\inetpub\wwwroot\inc\toolbox.class.php line 659
*** PHP Warning(2): strcmp() expects parameter 1 to be string, array given
Backtrace :
:
plugins\impacts\inc\config.class.php:141 strcmp()
plugins\impacts\inc\impact.class.php:508 PluginImpactsConfig::getAssetList()
plugins\impacts\inc\impact.class.php:389 PluginImpactsImpact::dropdownAllDevices()
plugins\impacts\inc\impact.class.php:156 PluginImpactsImpact::showOppositeListForItem()
plugins\impacts\inc\impact.class.php:137 PluginImpactsImpact::showForItem()
inc\commonglpi.class.php:485 PluginImpactsImpact::displayTabContentForItem()
ajax\common.tabs.php:92 CommonGLPI::displayStandardTab()
{"user":"2430@GLPI02","mem_usage":"0.000", 2.89Mio)"}
[2019-09-02 10:42:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in C:\inetpub\wwwroot\inc\toolbox.class.php line 659
*** PHP Warning(2): strcmp() expects parameter 1 to be string, array given
Backtrace :
:
plugins\impacts\inc\config.class.php:141 strcmp()
plugins\impacts\inc\impact.class.php:508 PluginImpactsConfig::getAssetList()
plugins\impacts\inc\impact.class.php:389 PluginImpactsImpact::dropdownAllDevices()
plugins\impacts\inc\impact.class.php:156 PluginImpactsImpact::showOppositeListForItem()
plugins\impacts\inc\impact.class.php:137 PluginImpactsImpact::showForItem()
inc\commonglpi.class.php:485 PluginImpactsImpact::displayTabContentForItem()
ajax\common.tabs.php:92 CommonGLPI::displayStandardTab()
{"user":"2430@GLPI02","mem_usage":"0.000", 2.89Mio)"}
[2019-09-02 10:42:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in C:\inetpub\wwwroot\inc\toolbox.class.php line 659
*** PHP Warning(2): strcmp() expects parameter 1 to be string, array given
Backtrace :

@tomolimo
Copy link
Owner

tomolimo commented Sep 2, 2019

Hello @yalgva
Coud you give GLPI version, and plugin version?
Thank you
Regards,
Tomolimo

@tomolimo
Copy link
Owner

tomolimo commented Sep 2, 2019

Hello @yalgva
And I also need to have the list of installed plugins.
Thank you
Regards,
Tomolimo

@tomolimo tomolimo changed the title php error log PHP Warning(2): strcmp() expects parameter 1 to be string, array given Sep 2, 2019
@yalgva
Copy link
Author

yalgva commented Sep 3, 2019

Hello Tomolimo,

glpi 9.4.3
addressing Name: Adressage IP Version: 2.8.0 State: Enabled
news Name: Alertes Version: 1.5.4 State: Enabled
appliances Name: Applicatifs Version: 2.5.0 State: Enabled
webapplications Name: Applications Web Version: 2.6.0 State: Enabled
impacts Name: Asset impacts Version: 1.3.2 State: Enabled
databases Name: Bases de données Version: 2.2.1 State: Enabled
fields Name: Champs supplémentaires Version: 1.9.2 State: Enabled
shellcommands Name: Commandes Shell Version: 2.3.0 State: Enabled
behaviors Name: Comportements Version: 2.2.1 State: Enabled
uninstall Name: Cycle de vie des matériels (un Version: 2.6.0 State: Enabled
mydashboard Name: Dashboard Version: 1.7.4 State: Enabled
escalade Name: Escalades Version: 2.4.4 State: Enabled
dataflows Name: Flux de données Version: 2.1.0 State: Enabled
formcreator Name: Form Creator Version: 2.8.4 State: Enabled
fusioninventory Name: FusionInventory Version: 9.4+1.1 State: Enabled
genericobject Name: Gestion d'objets Version: 2.7.0 State: Enabled
tag Name: Gestion des tags Version: 2.4.2 State: Enabled
manufacturersimports Name: Imports fabricants Version: 2.1.2 State: Enabled
pdf Name: Impression pdf Version: 1.6.0 State: Enabled
datainjection Name: Injection de fichiers Version: 2.7.0 State: Enabled
tasklists Name: Liste des tâches Version: 1.5.0 State: Enabled
moreticket Name: More ticket Version: 1.5.0 State: Enabled
notifications Name: Notifications Version: 9.4+1.0 State: Enabled
reports Name: Rapports Version: 1.13.1 State: Enabled
reservation Name: Reservation Version: 2.1.2 State: Enabled
archisw Name: Structures d'Applications Version: 2.1.3 State: Enabled
dashboard Name: Tableau de bord Version: 0.9.7 State: Enabled

@tomolimo
Copy link
Owner

tomolimo commented Sep 3, 2019

Hello @yalgva
Could you disable all the plugins (except impacts) and re-enable them till the issue is reproduced?
This will give us the plugin name which is not compatible with impacts, and such I'll be able to fix impacts.
Thank you,
Regards,
Tomolimo

@yalgva
Copy link
Author

yalgva commented Sep 3, 2019

Hello Olivier,
I will do it tomorrow morning and I come back to you
Thx

@tomolimo tomolimo self-assigned this Mar 12, 2020
@tomolimo tomolimo added the bug Something isn't working label Mar 12, 2020
@tomolimo tomolimo modified the milestones: 1.3.5, 1.3.6 Mar 12, 2020
@jcervantes-sipecom
Copy link

Hi, I got the same error in differents pages:

  • Home>Setup>General>Asset impact setup
  • Home>Assets>Computers/Monitors/Phone/ etc

PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141
PHP Warning: strcmp() expects parameter 1 to be string, array given in /var/www/html/glpi/plugins/impacts/inc/config.class.php at line 141

The plugin version is: 1.3.5 and the GLPI version is 9.4.6

I did what you suggest:

disable all the plugins (except impacts) and re-enable them

And found the conflict is with Tag Management (tag) plugin

@tomolimo
Copy link
Owner

Hello @jcervantes-sipecom
Which version of the Tag Management plugin do you have?
Thank you,
Regards,
Tomolimo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants