PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function themes_submenu()

I have freshly installed playSMS version 1.4. on centos 7 machine. Installation is OK, no issues, playsmsd also running but while browsing i got below error message, please suggest

[root@localhost httpd]# playsmsd check
PLAYSMSD_CONF = /etc/playsmsd.conf
PLAYSMS_PATH = /var/www/html/playsms
PLAYSMS_LIB = /var/lib/playsms
PLAYSMS_BIN = /usr/local/bin
PLAYSMS_LOG = /var/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING = 1
PIDS schedule = 3766
PIDS ratesmsd = 3768
PIDS dlrssmsd = 3770
PIDS recvsmsd = 3772
PIDS sendsmsd = 3774
[root@localhost httpd]#

http://localhost/index.php?app=main&inc=core_auth&route=login

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function themes_submenu(), 0 passed in /var/www/html/playsms/plugin/themes/common/fn.php on line 23 and exactly 1 expected in /var/www/html/playsms/plugin/core/themes/fn.php:39\nStack trace:\n#0 /var/www/html/playsms/plugin/themes/common/fn.php(23): themes_submenu()\n#1 /var/www/html/playsms/lib/fn_core.php(192): common_hook_themes_apply(’<table width=‘1…’)\n#2 /var/www/html/playsms/plugin/core/themes/fn.php(32): core_hook(‘common’, ‘themes_apply’, Array)\n#3 /var/www/html/playsms/inc/app/main.php(39): themes_apply(’<table width=‘1…’)\n#4 /var/www/html/playsms/index.php(34): include(’/var/www/html/p…’)\n#5 {main}\n thrown in /var/www/html/playsms/plugin/core/themes/fn.php on line 39

Hello!

Have same situation here!

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function themes_submenu(), 0 passed in /var /www/html/playsms/plugin/themes/common/fn.php on line 23 and exactly 1 expected in /var/www/html/playsms/plugin/core/themes/fn.php:39\nStack trace:\n#0 /var/www/html/playsms/plugin/themes/common/fn.php(23): themes_submenu()\n#1 /var/www/html/playsms/lib/fn_core.php(192): common_hook_themes_apply(’<table width=‘1…’)\n#2 /var/www/html/playsms/plugin/core/themes/fn.php(32): core_hook(‘common’, ‘themes_apply’, Array)\n#3 /var/www/html/playsms/inc/app/main.php(39): themes_apply(’<table width=‘1…’)\n#4 /var/www/html/playsms/index.php(34): include(’/var/www/html/p…’)\n#5 {main}\n thrown in /var/www/html/playsms/plugin/core/themes/fn.php on line 39

I also have same issue… no news about it yet???

re-install php properly as mentioned in tutorial

I use (https://github.com/antonraharja/playSMS/blob/master/INSTALL.md) this instruction for installation, but received similar error as mentioned above. Are you have any ideas?
I have:
Centos 7.5 x64
Apache 2.4.33
php php-mysql php-cli php-mbstring php-gb php-gettext (all is have 7.2.6 version)
First, I have mysql version 5.7.22 and upgrade it to 8.0.11

The tutorial you followed works 100%, as I you have php error, may be issue in in php. Any way follow this tutorial also ’ https://antonraharja.com/2016/08/22/playsms-1-4-on-centos-7-2-with-mariadb-5-5-50/

If you are not able to run playsms after following this tutorial, then give me root access of your system, I will do for you.

Arjun thanks for answer. I ready provide you access to my server. If you use Telegram or Skype, give me your credentials and I send you test sms. Else, send me please your e-mail address and I send you temporary login credentials.

I had the same issue
Solved it by editing playsms\plugin\themes\common\fn.php
Line 22

‘THEMES_SUBMENU’ => themes_submenu(),

should be

‘THEMES_SUBMENU’ => themes_submenu($content),

Michel thank u for your answer. but I reinstall php (7.2 ==> 7.0) and mysql (8.0 ==> 5.7) and service successful runned.

You mean you downgraded PHP and MySQL ?
Are you sure this is a good idea ?

Yes. I know, this is not good idea. But I don’t otherwise solve this problem(

Michel big thanks for your answer. Upgrade php and change that file and all successful run! Thank u again bro

You’re welcome.

By the way, i run into a problem with the function gateway_select_smsc()

It requires 2 arguments, not 1

So for instance in playsms/plugin/feature/sms_board/sms_board.php
Line 183
$select_reply_smsc = “

” . _(‘SMSC’) . “ ” . gateway_select_smsc(‘smsc’) . “ ”;

should be

$select_reply_smsc = “

” . _(‘SMSC’) . “ ” . gateway_select_smsc(‘smsc’,’’) . “ ”;

Hope this helps

Thank you for your answers. I’ll fix it right now. You know, I have faced such a problem: via the command line SMS is sent, but through playsms is not sent.

Is it double quote Michel?

Yes, double quotes
It must be 2 arguments

Sorry, i meant 2 single quotes

Thank you. I fixed it.

Thinking of it,
gateway_select_smsc(‘smsc’, false)
or
gateway_select_smsc(‘smsc’, null)
will work as well

Good luck

Thank you very much. Solved.