M1 PHP7.2 Patch - Customer Registration - “A non-numeric value encountered”Customer Account Registration FormError message in system.log regarding non well formed numeric value in Gd2.php*Completely* Disabling Frontend Customer RegistrationSet custom field value in customer registrationCannot add the item to shopping cart with exception - A non-numeric value encountered inMagento2 Customer Registration during checkoutDisable customer registration and loginMagento 2 Send Admin Customer Registration EmailAdditional field In customer Registration API

Why is a dedicated QA team member necessary?

Can 々 stand for a duplicated kanji with a different reading?

Alternative methods for solving a system of one linear one non linear simultaneous equations

Found more old paper shares from broken up companies

Can I pay with HKD in Macau or Shenzhen?

How can I tell if there was a power cut when I was out?

Travelling from Venice to Budapest, making a stop in Croatia

Are gangsters hired to attack people at a train station classified as a terrorist attack?

What happens if an IRB mistakenly approves unethical research?

Sometimes you are this word with three vowels

A team with high solidarity

How to write a sincerely religious protagonist without preaching or affirming or judging their worldview?

Why did modems have speakers?

Film where a boy turns into a princess

Why did NASA use Imperial units?

Where is this photo of a group of hikers taken? Is it really in the Ural?

In a script how can I signal who's winning the argument?

Why are MEMS in QFN packages?

what to say when a company asks you why someone (a friend) who was fired left?

How can the artificial womb be made affordable for the common people?

Short story about a group of sci-fi writers sitting around discussing their profession

What is the best word describing the nature of expiring in a short amount of time, connoting "losing public attention"?

Why do people say "I am broke" instead of "I am broken"?

Can't understand how static works exactly



M1 PHP7.2 Patch - Customer Registration - “A non-numeric value encountered”


Customer Account Registration FormError message in system.log regarding non well formed numeric value in Gd2.php*Completely* Disabling Frontend Customer RegistrationSet custom field value in customer registrationCannot add the item to shopping cart with exception - A non-numeric value encountered inMagento2 Customer Registration during checkoutDisable customer registration and loginMagento 2 Send Admin Customer Registration EmailAdditional field In customer Registration API






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch:



If I choose optional DOB and register without DOB, the logfile shows an error:



2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 94
2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 95


To reproduce:



  1. Backend configuration:

    System -> Configuration -> Customers -> Customer Configuration -> Name and Address Options -> Show Date of Birth: "Optional"

  2. Register without submitting a DOB.


I guess the error shows up because magento tries to process the DOB, but it's empty?
So I looked at the lines in PhpMath.php and found that only one parameter in the affected function is tested to be empty. So I added the the same lines for the second one (which works for now).




lib/Zend/Locale/Math/PhpMath.php




 public static function Sub($op1, $op2, $scale = null)

if ($scale === null)
$scale = Zend_Locale_Math_PhpMath::$defaultScale;
$precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
else
$precision = pow(10, -$scale);


if (empty($op1))
$op1 = 0;


+ if (empty($op2))
+ $op2 = 0;
+
+
$op1 = self::normalize($op1);
$op2 = self::normalize($op2);
$result = $op1 - $op2;
if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision))
#require_once 'Zend/Locale/Math/Exception.php';
throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result);


return self::round(self::normalize($result), $scale);



But over all I don't feel very fine changing functions in the ZendFramework part of Magento, considering that for consistency reasons there are several more changes necessary.



Maybe anyone got any other tips?

Thank you for your recommendations!










share|improve this question




























    1















    I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch:



    If I choose optional DOB and register without DOB, the logfile shows an error:



    2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 94
    2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 95


    To reproduce:



    1. Backend configuration:

      System -> Configuration -> Customers -> Customer Configuration -> Name and Address Options -> Show Date of Birth: "Optional"

    2. Register without submitting a DOB.


    I guess the error shows up because magento tries to process the DOB, but it's empty?
    So I looked at the lines in PhpMath.php and found that only one parameter in the affected function is tested to be empty. So I added the the same lines for the second one (which works for now).




    lib/Zend/Locale/Math/PhpMath.php




     public static function Sub($op1, $op2, $scale = null)

    if ($scale === null)
    $scale = Zend_Locale_Math_PhpMath::$defaultScale;
    $precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
    else
    $precision = pow(10, -$scale);


    if (empty($op1))
    $op1 = 0;


    + if (empty($op2))
    + $op2 = 0;
    +
    +
    $op1 = self::normalize($op1);
    $op2 = self::normalize($op2);
    $result = $op1 - $op2;
    if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision))
    #require_once 'Zend/Locale/Math/Exception.php';
    throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result);


    return self::round(self::normalize($result), $scale);



    But over all I don't feel very fine changing functions in the ZendFramework part of Magento, considering that for consistency reasons there are several more changes necessary.



    Maybe anyone got any other tips?

    Thank you for your recommendations!










    share|improve this question
























      1












      1








      1








      I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch:



      If I choose optional DOB and register without DOB, the logfile shows an error:



      2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 94
      2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 95


      To reproduce:



      1. Backend configuration:

        System -> Configuration -> Customers -> Customer Configuration -> Name and Address Options -> Show Date of Birth: "Optional"

      2. Register without submitting a DOB.


      I guess the error shows up because magento tries to process the DOB, but it's empty?
      So I looked at the lines in PhpMath.php and found that only one parameter in the affected function is tested to be empty. So I added the the same lines for the second one (which works for now).




      lib/Zend/Locale/Math/PhpMath.php




       public static function Sub($op1, $op2, $scale = null)

      if ($scale === null)
      $scale = Zend_Locale_Math_PhpMath::$defaultScale;
      $precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
      else
      $precision = pow(10, -$scale);


      if (empty($op1))
      $op1 = 0;


      + if (empty($op2))
      + $op2 = 0;
      +
      +
      $op1 = self::normalize($op1);
      $op2 = self::normalize($op2);
      $result = $op1 - $op2;
      if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision))
      #require_once 'Zend/Locale/Math/Exception.php';
      throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result);


      return self::round(self::normalize($result), $scale);



      But over all I don't feel very fine changing functions in the ZendFramework part of Magento, considering that for consistency reasons there are several more changes necessary.



      Maybe anyone got any other tips?

      Thank you for your recommendations!










      share|improve this question














      I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch:



      If I choose optional DOB and register without DOB, the logfile shows an error:



      2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 94
      2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-numeric value encountered in /var/www/html/magento1924/lib/Zend/Locale/Math/PhpMath.php on line 95


      To reproduce:



      1. Backend configuration:

        System -> Configuration -> Customers -> Customer Configuration -> Name and Address Options -> Show Date of Birth: "Optional"

      2. Register without submitting a DOB.


      I guess the error shows up because magento tries to process the DOB, but it's empty?
      So I looked at the lines in PhpMath.php and found that only one parameter in the affected function is tested to be empty. So I added the the same lines for the second one (which works for now).




      lib/Zend/Locale/Math/PhpMath.php




       public static function Sub($op1, $op2, $scale = null)

      if ($scale === null)
      $scale = Zend_Locale_Math_PhpMath::$defaultScale;
      $precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
      else
      $precision = pow(10, -$scale);


      if (empty($op1))
      $op1 = 0;


      + if (empty($op2))
      + $op2 = 0;
      +
      +
      $op1 = self::normalize($op1);
      $op2 = self::normalize($op2);
      $result = $op1 - $op2;
      if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision))
      #require_once 'Zend/Locale/Math/Exception.php';
      throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result);


      return self::round(self::normalize($result), $scale);



      But over all I don't feel very fine changing functions in the ZendFramework part of Magento, considering that for consistency reasons there are several more changes necessary.



      Maybe anyone got any other tips?

      Thank you for your recommendations!







      magento-1.9 customer register registration php-7.2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 16 '18 at 10:28









      ulbioproulbiopro

      164 bronze badges




      164 bronze badges




















          2 Answers
          2






          active

          oldest

          votes


















          1















          https://github.com/Inchoo/Inchoo_PHP7/issues/125



          [...]
          But I see that PhpMath class isn't used by Zend when bcmath extension is enabled, so enabling bcmath in php could maybe solve the problem?




          That did the job for me.






          share|improve this answer






























            0














            It's a PHP version issue.



            Few versions support $varibale = ""(Blnk) but the latest PHP version needs $variable = 0 instead of the blank to consider it's value as the numeric.






            share|improve this answer



























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "479"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246651%2fm1-php7-2-patch-customer-registration-a-non-numeric-value-encountered%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1















              https://github.com/Inchoo/Inchoo_PHP7/issues/125



              [...]
              But I see that PhpMath class isn't used by Zend when bcmath extension is enabled, so enabling bcmath in php could maybe solve the problem?




              That did the job for me.






              share|improve this answer



























                1















                https://github.com/Inchoo/Inchoo_PHP7/issues/125



                [...]
                But I see that PhpMath class isn't used by Zend when bcmath extension is enabled, so enabling bcmath in php could maybe solve the problem?




                That did the job for me.






                share|improve this answer

























                  1












                  1








                  1








                  https://github.com/Inchoo/Inchoo_PHP7/issues/125



                  [...]
                  But I see that PhpMath class isn't used by Zend when bcmath extension is enabled, so enabling bcmath in php could maybe solve the problem?




                  That did the job for me.






                  share|improve this answer














                  https://github.com/Inchoo/Inchoo_PHP7/issues/125



                  [...]
                  But I see that PhpMath class isn't used by Zend when bcmath extension is enabled, so enabling bcmath in php could maybe solve the problem?




                  That did the job for me.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 17 '18 at 13:36









                  ulbioproulbiopro

                  164 bronze badges




                  164 bronze badges























                      0














                      It's a PHP version issue.



                      Few versions support $varibale = ""(Blnk) but the latest PHP version needs $variable = 0 instead of the blank to consider it's value as the numeric.






                      share|improve this answer





























                        0














                        It's a PHP version issue.



                        Few versions support $varibale = ""(Blnk) but the latest PHP version needs $variable = 0 instead of the blank to consider it's value as the numeric.






                        share|improve this answer



























                          0












                          0








                          0







                          It's a PHP version issue.



                          Few versions support $varibale = ""(Blnk) but the latest PHP version needs $variable = 0 instead of the blank to consider it's value as the numeric.






                          share|improve this answer















                          It's a PHP version issue.



                          Few versions support $varibale = ""(Blnk) but the latest PHP version needs $variable = 0 instead of the blank to consider it's value as the numeric.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jul 15 at 7:16

























                          answered Jul 15 at 5:43









                          zuber bandizuber bandi

                          1991 silver badge7 bronze badges




                          1991 silver badge7 bronze badges



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Magento Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246651%2fm1-php7-2-patch-customer-registration-a-non-numeric-value-encountered%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown