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

Unsupported operand types: string + int #3894

Closed
aorsmen opened this issue Nov 12, 2023 · 4 comments · Fixed by #3904
Closed

Unsupported operand types: string + int #3894

aorsmen opened this issue Nov 12, 2023 · 4 comments · Fixed by #3904

Comments

@aorsmen
Copy link

aorsmen commented Nov 12, 2023

Getting this error when the page loads at the front end of the website. Also, my captcha setting is disabled in the settings.


TypeError Caught
Unsupported operand types: string + int
Captcha.php:115

Environment Details:

  • Version: 7.3.14
  • PHP Version 8.1.2-1ubuntu2.14
  • MySQL Version 8.0.35
  • OS: Linux
  • Web Server: Apache
@intoeetive
Copy link
Contributor

Would you be able to narrow this down to specific template code used? (This is most likely cause by some form tag, that could potentially use Captcha)

@aorsmen
Copy link
Author

aorsmen commented Nov 15, 2023

Hi,

The only form tag in the code is below. But I am not using a captcha in the code.

`
{exp:channel:form id="newsletter-form" channel="newsletter" dynamic_title="[newsletter_email]" json="yes" include_assets="no" include_css="no" include_jquery="no" rules:newsletter_email="required|valid_email"}

Sign up
{/exp:channel:form}
<script> const NEWSLETTER_SENT = '{newsletter_msg_sent}'; const NEWSLETTER_VALID_EMAIL = '{newsletter_msg_invalid_email}'; const NEWSLETTER_EMAIL_EXIST = '{newsletter_msg_email_exist}'; const NEWSLETTER_ERROR = '{newsletter_msg_email_exist}' </script> `

Thank you

@intoeetive
Copy link
Contributor

I am not replicating the issue with this code, but the referenced PR should fix it

@aorsmen
Copy link
Author

aorsmen commented Dec 22, 2023

Also, I am adding the error.

TypeError Caught
Unsupported operand types: string + int
ee/ExpressionEngine/Library/Captcha.php:115

Stack Trace: Please include when reporting this error
#0 ee/ExpressionEngine/Addons/channel/libraries/channel_form/Channel_form_lib.php(649): ExpressionEngine\Library\Captcha->create()
#1 ee/ExpressionEngine/Addons/channel/mod.channel.php(5110): Channel_form_lib->entry_form()
#2 ee/legacy/libraries/Template.php(1830): Channel->form()
#3 ee/legacy/libraries/Template.php(1505): EE_Template->process_tags()
#4 ee/legacy/libraries/Template.php(624): EE_Template->tags()
#5 ee/legacy/libraries/Template.php(247): EE_Template->parse()
#6 ee/legacy/libraries/Template.php(1034): EE_Template->fetch_and_parse()
#7 ee/legacy/libraries/Template.php(670): EE_Template->process_layout_template()
#8 ee/legacy/libraries/Template.php(247): EE_Template->parse()
#9 ee/legacy/libraries/Template.php(177): EE_Template->fetch_and_parse()
#10 ee/legacy/libraries/Core.php(811): EE_Template->run_template_engine()
#11 ee/legacy/controllers/ee.php(53): EE_Core->generate_page()
#12 [internal function]: EE->index()
#13 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
#14 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
#15 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
#16 html/index.php(164): require_once('...')
#16 html/index.php(164): require_once('...')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants