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

[php8.1 M2.4.5-p1 CE] ValueError: bcsub(): Argument #1 ($num1) is not well-formed in #36883

Closed
5 tasks done
jayantakr1 opened this issue Feb 17, 2023 · 8 comments
Closed
5 tasks done
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.5-p1 Indicates original Magento version for the Issue report.

Comments

@jayantakr1
Copy link

jayantakr1 commented Feb 17, 2023

Preconditions and environment

[2023-02-17T20:16:33.436118+00:00] main.CRITICAL: ValueError: bcsub(): Argument #1 ($num1) is not well-formed in /var/www/html/vendor/magento/zendframework1/library/Zend/Locale/Math.php:259
Stack trace:
#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Locale/Math.php(259): bcsub('2021-08-23 00:0...', '2021-08-23 00:0...', 0)
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Locale/Format.php(385): Zend_Locale_Math::Sub('2021-08-23 00:0...', '2021-08-23 00:0...', 0)
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Locale/Format.php(662): Zend_Locale_Format::toNumber('2021-08-23 00:0...', Array)
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Filter/NormalizedToLocalized.php(106): Zend_Locale_Format::toFloat('2021-08-23 00:0...', Array)
#4 /var/www/html/vendor/magento/framework/Data/Form/Filter/Date.php(69): Zend_Filter_NormalizedToLocalized->filter('2021-08-23 00:0...')
#5 /var/www/html/vendor/magento/module-customer/Model/Metadata/Form/AbstractData.php(197): Magento\Framework\Data\Form\Filter\Date->inputFilter('2021-08-23 00:0...')
#6 /var/www/html/vendor/magento/module-customer/Model/Metadata/Form/Date.php(20): Magento\Customer\Model\Metadata\Form\AbstractData->_applyInputFilter('2021-08-23 00:0...')
#7 /var/www/html/vendor/magento/module-customer/Model/Metadata/Form.php(244): Magento\Customer\Model\Metadata\Form\Date->extractValue(Object(Magento\Framework\App\Request\Http))
#8 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Model\Metadata\Form->extractData(Object(Magento\Framework\App\Request\Http), 'customer')
#9 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Model\Metadata\Form\Interceptor->___callParent('extractData', Array)
#10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Model\Metadata\Form\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http), 'customer')
#11 /var/www/html/generated/code/Magento/Customer/Model/Metadata/Form/Interceptor.php(41): Magento\Customer\Model\Metadata\Form\Interceptor->___callPlugins('extractData', Array, Array)
#12 /var/www/html/vendor/magento/module-customer/Controller/Adminhtml/Index/Validate.php(42): Magento\Customer\Model\Metadata\Form\Interceptor->extractData(Object(Magento\Framework\App\Request\Http), 'customer')
#13 /var/www/html/vendor/magento/module-customer/Controller/Adminhtml/Index/Validate.php(88): Magento\Customer\Controller\Adminhtml\Index\Validate->_validateCustomer(Object(Magento\Framework\DataObject))
#14 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Controller\Adminhtml\Index\Validate->execute()
#15 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->___callParent('execute', Array)
#16 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->Magento\Framework\Interception{closure}()
#17 /var/www/html/generated/code/Magento/Customer/Controller/Adminhtml/Index/Validate/Interceptor.php(23): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->___callPlugins('execute', Array, Array)
#18 /var/www/html/vendor/magento/framework/App/Action/Action.php(111): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->execute()
#19 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->___callParent('dispatch', Array)
#22 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/html/generated/code/Magento/Customer/Controller/Adminhtml/Index/Validate/Interceptor.php(32): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->___callPlugins('dispatch', Array, Array)
#26 /var/www/html/vendor/magento/framework/App/FrontController.php(245): Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#27 /var/www/html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor), Object(Magento\Framework\App\Request\Http))
#28 /var/www/html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Customer\Controller\Adminhtml\Index\Validate\Interceptor))
#29 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#31 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#32 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#33 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#35 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

Steps to reproduce

  1. After Magento 2 version upgrade from 2.3.7-p2 to 2.4.5-p1 we are getting this issue.
  2. When going to save customer that time i am getting issue

Expected result

It's should be success.

Actual result

customer not save

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Feb 17, 2023

Hi @jayantakr1. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-assistant
Copy link

m2-assistant bot commented Feb 18, 2023

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Hotel engcom-Hotel added the Reported on 2.4.5-p1 Indicates original Magento version for the Issue report. label Feb 20, 2023
@engcom-Dash
Copy link

Hi @jayantakr1 ,

Verified the issue in 2.4-develop instance,But we are not able to reproduce the issue.

Preconditions:
Magento Version 2.4-develop
PHP 8.1

Steps to reproduce:
1.Install 2.3.7-p1 Instance
2.Upgrade the current version to 2.4.5-p1
3.Save the customer

ScreenShots:
Screenshot 2023-02-20 at 11 30 10 PM

Customer saved successfully with out issue.

Thanks.

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Feb 20, 2023
@m2-assistant
Copy link

m2-assistant bot commented Feb 22, 2023

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Dash
Copy link

Hi @jayantakr1 ,

We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

@pfortin-expertime
Copy link

pfortin-expertime commented Apr 25, 2023

I may have a clue how to reproduce, it is to setup the store-view with another locale than US.

I'm using Korean and I get the same result as @jayantakr1 , because this function in Customer/Model/Metadata/Form/AbstractData.php

protected function _dateFilterFormat($format = null)
{
	if ($format === null) {
		// get format
		if ($this->_dateFilterFormat === null) {
			$this->_dateFilterFormat = \IntlDateFormatter::SHORT;
		}
		return $this->_localeDate->getDateFormat($this->_dateFilterFormat);
	} elseif ($format === false) {
		// reset value
		$this->_dateFilterFormat = null;
		return $this;
	}

	$this->_dateFilterFormat = $format;
	return $this;
}

returns the format "yy. M. d." which is used later on with the filter, and it is messing up with the function bcsub

@joelness89
Copy link

I am getting this error as well

Adobe Commerce ver. 2.4.5
PHP 8.1.23

Steps to re-produce
From admin navigate to customer specific record, make any edit , click Save

[2023-09-22T15:09:28.747977+00:00] report.CRITICAL: ValueError: bcsub(): Argument #1 ($num1) is not well-formed in /chroot/local/HIDDEN/HIDDEN.com/current/vendor/magento/zendframework1/library/Zend/Locale/Math.php:259
#0 /chroot/local/HIDDEN/HIDDEN.com/current/vendor/magento/zendframework1/library/Zend/Locale/Math.php(259): bcsub('2019-01-23 16:4...', '2019-01-23 16:4...', 0)

@janssensjelle
Copy link

We have the same issue but we have this because we use a specific date notation on our other languages and have this in the template. This causes an issue with DOBs in the template that uses the en_us locale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.5-p1 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

7 participants