Skip to Content Skip to Menu

[SOLVED] Error when saving users

  • kondrich
  • kondrich
  • OFFLINE
  • Posts: 10
  • Thanks: 2
  • Karma: 0
3 years 1 month ago - 3 years 1 month ago #326385 by kondrich
[SOLVED] Error when saving users was created by kondrich
Hi,

when I save a new CB user after creation, I always get:
Code:
Error 0 mysqli_real_escape_string(): Argument #2 ($string) must be of type string, array given

However, the user was successfully created.

I notice this since some time. It might have occurred first when moving from PHP 7.4 to PHP8.

Current environment: CB 2.6.2+build.2021.09.14.16.17.57.a215a4c15, Joomla 3.10.2, PHP 8.0.10, MariaDB 10.5.10 hosted on Windows Server 2019
Last edit: 3 years 1 month ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
3 years 1 month ago #326388 by beat
Replied by beat on topic Error when saving users
Can you please briefly turn on Site debug, in Joomla configuration, Server tab, and retry while debug is on ?

There will be much more information that will be helpful.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • kondrich
  • kondrich
  • OFFLINE
  • Posts: 10
  • Thanks: 2
  • Karma: 0
3 years 1 month ago - 3 years 1 month ago #326389 by kondrich
Replied by kondrich on topic Error when saving users
Code:
0 mysqli_real_escape_string(): Argument #2 ($string) must be of type string, array given PhysicalPathToJoomlaRoot\libraries\joomla\database\driver\mysqli.php:254 Call stack # Function Location 1 () JROOT\libraries\joomla\database\driver\mysqli.php:254 2 mysqli_real_escape_string() JROOT\libraries\joomla\database\driver\mysqli.php:254 3 JDatabaseDriverMysqli->escape() JROOT\administrator\components\com_jnews\classes\class.subscribers.php:263 4 jNews_Subscribers::saveSubscriber() JROOT\administrator\components\com_jnews\classes\class.subscribers.php:438 5 jNews_Subscribers::updateCBFESubscriber() JROOT\components\com_comprofiler\plugin\user\plug_jnewscbplugin\jnews_cb.php:320 6 getjNewsTab->userActivated() JROOT\libraries\CBLib\CB\Legacy\cbPluginHandler.php:880 7 cbPluginHandler->call() JROOT\libraries\CBLib\CB\Legacy\cbPluginHandler.php:1293 8 cbPluginHandler->trigger() JROOT\libraries\CBLib\CB\Legacy\LegacyComprofilerFunctions.php:810 9 activateUser() JROOT\libraries\CBLib\CB\Database\Table\UserTable.php:1166 10 CB\Database\Table\UserTable->saveSafely() JROOT\administrator\components\com_comprofiler\controller\controller.user.php:171 11 CBController_user->saveUser() JROOT\administrator\components\com_comprofiler\admin.comprofiler.controller.php:283 12 require() JROOT\administrator\components\com_comprofiler\comprofiler.php:14 13 require_once() JROOT\libraries\src\Component\ComponentHelper.php:402 14 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT\libraries\src\Component\ComponentHelper.php:377 15 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:101 16 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:159 17 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:225 18 Joomla\CMS\Application\CMSApplication->execute() JROOT\administrator\index.php:51

Thank you for the hint. It's the jNews plugin. I disabled it and the error was gone. It's an old version of jNews that we do not use anymore (just to extract old email texts as templates).
Last edit: 3 years 1 month ago by kondrich.
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum