Warning: A non-numeric value encounteredWarning: A non-numeric value encountered inWarning: A non-numeric value encountered when upgrading to PHP 7.2why Am i getting Warning: A non-numeric value encountered in C:xampphtdocsoop_phfunction.php?Warning: A non-numeric value encountered in /templates/section-home.php on Line 34Wordpress Theme Fault, A non-numeric value encountered in PHP 7.2How to debug if a non-numeric value encounteredWarning: A non-numeric value encountered in handler.php on line 62Error: Warning: A non-numeric value encountered in php codeWarning: A non-numeric value encountered in D:xampphtdocsBoutiquecar.php on line 309WordPress theme error: A non-numeric value encountered in C:wamp64wwwwp-contentthemesretrotubetemp-style.php on line 16Reference — What does this symbol mean in PHP?Showing all errors and warningsA non well formed numeric value encounteredHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?A non-numeric value encountered in phpA non-numeric value encountered error in php 7.1 after upgrade wordpress coreWarning: A non-numeric value encountered inPHP Warning: A non-numeric value encounteredWarning: A non-numeric value encountered on line 234

Definition of Newton's first law

On what legal basis did the UK remove the 'European Union' from its passport?

How does Howard Stark know this?

Exclude loop* snap devices from lsblk output?

51% attack - apparently very easy? refering to CZ's "rollback btc chain" - How to make sure such corruptible scenario can never happen so easily?

Python Pandas Expand a Column of List of Lists to Two New Column

How can dragons propel their breath attacks to a long distance

What is Plautus’s pun about frustum and frustrum?

Can 'sudo apt-get remove [write]' destroy my Ubuntu?

What kind of SATA connector is this?

Why was castling bad for white in this game, and engine strongly prefered trading queens?

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

Size of a folder with du

Was this character’s old age look CGI or make-up?

What is the significance of 4200 BCE in context of farming replacing foraging in Europe?

Two researchers want to work on the same extension to my paper. Who to help?

Can the sorting of a list be verified without comparing neighbors?

Light Switch Terminals

Drawing lines to nearest point

What's the difference between a Bunsen burner and a gas stove?

How to slow yourself down (for playing nice with others)

Create a list of all possible Boolean configurations of three constraints

Why was Thor doubtful about his worthiness to Mjolnir?

How can a layman easily get the consensus view of what academia *thinks* about a subject?



Warning: A non-numeric value encountered


Warning: A non-numeric value encountered inWarning: A non-numeric value encountered when upgrading to PHP 7.2why Am i getting Warning: A non-numeric value encountered in C:xampphtdocsoop_phfunction.php?Warning: A non-numeric value encountered in /templates/section-home.php on Line 34Wordpress Theme Fault, A non-numeric value encountered in PHP 7.2How to debug if a non-numeric value encounteredWarning: A non-numeric value encountered in handler.php on line 62Error: Warning: A non-numeric value encountered in php codeWarning: A non-numeric value encountered in D:xampphtdocsBoutiquecar.php on line 309WordPress theme error: A non-numeric value encountered in C:wamp64wwwwp-contentthemesretrotubetemp-style.php on line 16Reference — What does this symbol mean in PHP?Showing all errors and warningsA non well formed numeric value encounteredHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?A non-numeric value encountered in phpA non-numeric value encountered error in php 7.1 after upgrade wordpress coreWarning: A non-numeric value encountered inPHP Warning: A non-numeric value encounteredWarning: A non-numeric value encountered on line 234






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








68















Recently updated to PHP 7.1 and start getting following error




Warning: A non-numeric value encountered in on line 29




Here is what line 29 looks like



$sub_total += ($item['quantity'] * $product['price']);


On localhost all works fine..



Any ideas how to tackle this or what it is ?










share|improve this question



















  • 3





    var_dump($item['quantity'], $product['price'])

    – u_mulder
    Feb 4 '17 at 18:46






  • 1





    Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

    – tjfo
    Feb 4 '17 at 18:49






  • 1





    @MichaelHanon where is the answer you are referring to? what is the syntax error?

    – FKEinternet
    Nov 19 '17 at 9:02











  • $sub_total += ((int)$item['quantity'] * (int)$product['price']);

    – I am the Most Stupid Person
    Feb 26 '18 at 9:50











  • i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

    – saber tabatabaee yazdi
    May 26 '18 at 21:03


















68















Recently updated to PHP 7.1 and start getting following error




Warning: A non-numeric value encountered in on line 29




Here is what line 29 looks like



$sub_total += ($item['quantity'] * $product['price']);


On localhost all works fine..



Any ideas how to tackle this or what it is ?










share|improve this question



















  • 3





    var_dump($item['quantity'], $product['price'])

    – u_mulder
    Feb 4 '17 at 18:46






  • 1





    Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

    – tjfo
    Feb 4 '17 at 18:49






  • 1





    @MichaelHanon where is the answer you are referring to? what is the syntax error?

    – FKEinternet
    Nov 19 '17 at 9:02











  • $sub_total += ((int)$item['quantity'] * (int)$product['price']);

    – I am the Most Stupid Person
    Feb 26 '18 at 9:50











  • i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

    – saber tabatabaee yazdi
    May 26 '18 at 21:03














68












68








68


8






Recently updated to PHP 7.1 and start getting following error




Warning: A non-numeric value encountered in on line 29




Here is what line 29 looks like



$sub_total += ($item['quantity'] * $product['price']);


On localhost all works fine..



Any ideas how to tackle this or what it is ?










share|improve this question
















Recently updated to PHP 7.1 and start getting following error




Warning: A non-numeric value encountered in on line 29




Here is what line 29 looks like



$sub_total += ($item['quantity'] * $product['price']);


On localhost all works fine..



Any ideas how to tackle this or what it is ?







php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 4 '17 at 20:25









Alexandre Neukirchen

2,07661529




2,07661529










asked Feb 4 '17 at 18:42









Imran RafiqueImran Rafique

4561512




4561512







  • 3





    var_dump($item['quantity'], $product['price'])

    – u_mulder
    Feb 4 '17 at 18:46






  • 1





    Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

    – tjfo
    Feb 4 '17 at 18:49






  • 1





    @MichaelHanon where is the answer you are referring to? what is the syntax error?

    – FKEinternet
    Nov 19 '17 at 9:02











  • $sub_total += ((int)$item['quantity'] * (int)$product['price']);

    – I am the Most Stupid Person
    Feb 26 '18 at 9:50











  • i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

    – saber tabatabaee yazdi
    May 26 '18 at 21:03













  • 3





    var_dump($item['quantity'], $product['price'])

    – u_mulder
    Feb 4 '17 at 18:46






  • 1





    Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

    – tjfo
    Feb 4 '17 at 18:49






  • 1





    @MichaelHanon where is the answer you are referring to? what is the syntax error?

    – FKEinternet
    Nov 19 '17 at 9:02











  • $sub_total += ((int)$item['quantity'] * (int)$product['price']);

    – I am the Most Stupid Person
    Feb 26 '18 at 9:50











  • i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

    – saber tabatabaee yazdi
    May 26 '18 at 21:03








3




3





var_dump($item['quantity'], $product['price'])

– u_mulder
Feb 4 '17 at 18:46





var_dump($item['quantity'], $product['price'])

– u_mulder
Feb 4 '17 at 18:46




1




1





Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

– tjfo
Feb 4 '17 at 18:49





Looks like a new warning in PHP 7 (as you are aware). php.net/manual/en/migration71.other-changes.php When you get the error do those variables have values? I think you could avoid it by initializing them to 0.

– tjfo
Feb 4 '17 at 18:49




1




1





@MichaelHanon where is the answer you are referring to? what is the syntax error?

– FKEinternet
Nov 19 '17 at 9:02





@MichaelHanon where is the answer you are referring to? what is the syntax error?

– FKEinternet
Nov 19 '17 at 9:02













$sub_total += ((int)$item['quantity'] * (int)$product['price']);

– I am the Most Stupid Person
Feb 26 '18 at 9:50





$sub_total += ((int)$item['quantity'] * (int)$product['price']);

– I am the Most Stupid Person
Feb 26 '18 at 9:50













i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

– saber tabatabaee yazdi
May 26 '18 at 21:03






i use legacy format like this a=a+b; or str=str."<a href='".str2."'>asd</a>"; or $this->storeItems = $this->storeItems . $str;

– saber tabatabaee yazdi
May 26 '18 at 21:03













14 Answers
14






active

oldest

votes


















60














It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link.



Here is the relevant portion that pertains to the Warning notice you are getting:




New E_WARNING and E_NOTICE errors have been introduced when invalid
strings are coerced using operators expecting numbers or their
assignment equivalents. An E_NOTICE is emitted when the string begins
with a numeric value but contains trailing non-numeric characters, and
an E_WARNING is emitted when the string does not contain a numeric
value.




I'm guessing either $item['quantity'] or $product['price'] does not contain a numeric value, so make sure that they do before trying to multiply them. Maybe use some sort of conditional before calculating the $sub_total, like so:



<?php

if (is_numeric($item['quantity']) && is_numeric($product['price']))
$sub_total += ($item['quantity'] * $product['price']);
else
// do some error handling...






share|improve this answer


















  • 2





    I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

    – M H
    Jun 15 '17 at 15:24











  • Is there a way to turn this warning off via php.ini?

    – BeniRose
    Aug 28 '17 at 16:49











  • @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

    – Daniel.Schroeder
    Sep 2 '17 at 3:33






  • 1





    Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

    – BeniRose
    Sep 6 '17 at 16:16






  • 3





    Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

    – I am the Most Stupid Person
    Feb 13 '18 at 11:34


















90














Not exactly the issue you had but the same error for people searching.



This happened to me when I spent too much time on JavaScript.



Coming back to PHP I concatenated two strings with "+" instead of "." and got that error.






share|improve this answer

























  • Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

    – namezero
    Jan 9 at 16:36







  • 2





    This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

    – Dut A.
    Jan 24 at 5:54






  • 1





    And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

    – imin
    Feb 25 at 18:04






  • 1





    as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

    – Martin Zeitler
    Mar 3 at 16:31



















41














You can solve the problem without any new logic by just casting the thing into the number, which prevents the warning and is equivalent to the behavior in PHP 7.0 and below:



$sub_total += ((int)$item['quantity'] * (int)$product['price']);


(The answer from Daniel Schroeder is not equivalent because $sub_total would remain unset if non-numeric values are encountered. For example, if you print out $sub_total, you would get an empty string, which is probably wrong in an invoice. - by casting you make sure that $sub_total is an integer.)






share|improve this answer


















  • 1





    that's a bad practice. You need to filter your inputs

    – Ciro Vargas
    May 25 '17 at 3:47






  • 3





    This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

    – M H
    Jun 15 '17 at 15:32






  • 3





    @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

    – Roland Seuhs
    Jun 27 '17 at 12:24











  • @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

    – Daniel.Schroeder
    Sep 2 '17 at 3:10






  • 2





    Just (int)$var fixed for me on php 7.1.8 thank you

    – user5247236
    Sep 10 '17 at 14:31


















11














In my case it was because of me used "+" as in other language but in PHP strings concatenation oprator is "." .






share|improve this answer






























    5














    This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:



    In File:



    C:amppsphpMyAdminlibrariesDisplayResults.class.php


    I changed this:



    // Move to the next page or to the last one
    $endpos = $_SESSION['tmpval']['pos']
    + $_SESSION['tmpval']['max_rows'];


    To this:



    $endpos = 0;
    if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos']))
    $endpos += $_SESSION['tmpval']['pos'];

    if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows']))
    $endpos += $_SESSION['tmpval']['max_rows'];



    Hope that save's someone some trouble...






    share|improve this answer






























      3














      I had this issue with my pagination forward and backward link .... simply set (int ) in front of the variable $Page+1 and it worked...



      <?php 
      $Page = (isset($_GET['Page']) ? $_GET['Page'] : '');
      if ((int)$Page+1<=$PostPagination)
      ?>
      <li> <a href="Index.php?Page=<?php echo $Page+1; ?>"> &raquo;</a></li>
      <?php
      ?>





      share|improve this answer






























        2














        Check if you're not incrementing with some variable that its value is an empty string like ''.



        Example:



        $total = '';
        $integers = range(1, 5);

        foreach($integers as $integer)
        $total += $integer;






        share|improve this answer























        • Super, this is a case missed in most of the other answers.

          – Trendfischer
          Feb 28 at 16:37


















        2














        I encountered the issue in phpmyadmin with PHP 7.3. Thanks @coderama, I changed libraries/DisplayResults.class.php line 855 from



        // Move to the next page or to the last one
        $endpos = $_SESSION['tmpval']['pos']
        + $_SESSION['tmpval']['max_rows'];


        into



        // Move to the next page or to the last one
        $endpos = (int)$_SESSION['tmpval']['pos']
        + (int)$_SESSION['tmpval']['max_rows'];


        Fixed.






        share|improve this answer






























          1














          Try this.



          $sub_total = 0;


          and within your loop now you can use this



          $sub_total += ($item['quantity'] * $product['price']);


          It should solve your problem.






          share|improve this answer






























            1














            I just looked at this page as I had this issue. For me I had floating point numbers calculated from an array but even after designating the variables as floating points the error was still given, here's the simple fix and example code underneath which was causing the issue.



            Example PHP



            <?php
            $subtotal = 0; //Warning fixed
            $shippingtotal = 0; //Warning fixed

            $price = array($row3['price']);
            $shipping = array($row3['shipping']);
            $values1 = array_sum($price);
            $values2 = array_sum($shipping);
            (float)$subtotal += $values1; // float is irrelevant $subtotal creates warning
            (float)$shippingtotal += $values2; // float is irrelevant $shippingtotal creates warning
            ?>





            share|improve this answer






























              1














              $sn = 0;//increment the serial number, then add the sn to job
              for($x = 0; $x<20; $x++)

              $sn++;
              $added_date = "10/10/10";
              $job_title = "new job";
              $salary = $sn*1000;
              $cd = "27/10/2017";//the closing date
              $ins = "some institution";//the institution for the vacancy
              $notes = "some notes here";//any notes about the jobs

              $sn_div = "<div class='sn_div'>".$sn."</div>";
              $ad_div = "<div class='ad_div'>".$added_date."</div>";
              $job_div = "<div class='job_div'>".$job_title."</div>";
              $salary_div = "<div class='salary_div'>".$salary."</div>";
              $cd_div = "<div class='cd_div'>".$cd."</div>";//cd means closing date
              $ins_div = "<div class='ins_div'>".$ins."</div>";//ins means institution
              $notes_div = "<div class='notes_div'>".$notes."</div>";


              /*erroneous line*/$job_no = "job"+$sn;//to create the job rows
              $$job_no = "<div class='job_wrapper'>".$sn_div.$ad_div.$job_div.$salary_div.$cd_div.$ins_div.$notes_div."</div>";

              echo $$job_no;//and then echo each job




              that's the code I had which looped and created new html div elements. The code worked fine and the elements were formed, but i got the same warning in the error_log.



              After reading the useful other answers, I figured that I was summing up a string and a number in the erroneous line. So I changed the code at that line to



              /*erroneous line*/$job_no = "job"&&$sn;//this is the new variable that will create the job rows


              Now the code works as earlier but with no warnings this time. Hope this example would be useful to someone.






              share|improve this answer






























                1














                Solve this error on WordPress




                Warning: A non-numeric value encountered in C:XAMPPhtdocsaad-2wp-includesSimplePieParseDate.php on line 694




                Simple solution here!



                1. locate a file of wp-includesSimplePieParseDate.php

                2. find a line no. 694

                3. you show the code $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

                4. and change this 3.) to this line $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));





                share|improve this answer
































                  1














                  $sub_total_price = 0; 

                  foreach($booking_list as $key=>$value)
                  $sub_total_price += ($price * $quantity);


                  echo $sub_total_price;


                  it's working 100% :)






                  share|improve this answer
































                    1














                    That's happen usually when you con-cat strings with + sign. In PHP you can make concatenation using dot sign (.) So sometimes I accidentally put + sign between two strings in PHP, and it show me this error, since you can use + sign in numbers only.






                    share|improve this answer





















                      protected by Obsidian Age Feb 10 at 20:46



                      Thank you for your interest in this question.
                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                      Would you like to answer one of these unanswered questions instead?














                      14 Answers
                      14






                      active

                      oldest

                      votes








                      14 Answers
                      14






                      active

                      oldest

                      votes









                      active

                      oldest

                      votes






                      active

                      oldest

                      votes









                      60














                      It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link.



                      Here is the relevant portion that pertains to the Warning notice you are getting:




                      New E_WARNING and E_NOTICE errors have been introduced when invalid
                      strings are coerced using operators expecting numbers or their
                      assignment equivalents. An E_NOTICE is emitted when the string begins
                      with a numeric value but contains trailing non-numeric characters, and
                      an E_WARNING is emitted when the string does not contain a numeric
                      value.




                      I'm guessing either $item['quantity'] or $product['price'] does not contain a numeric value, so make sure that they do before trying to multiply them. Maybe use some sort of conditional before calculating the $sub_total, like so:



                      <?php

                      if (is_numeric($item['quantity']) && is_numeric($product['price']))
                      $sub_total += ($item['quantity'] * $product['price']);
                      else
                      // do some error handling...






                      share|improve this answer


















                      • 2





                        I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                        – M H
                        Jun 15 '17 at 15:24











                      • Is there a way to turn this warning off via php.ini?

                        – BeniRose
                        Aug 28 '17 at 16:49











                      • @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:33






                      • 1





                        Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                        – BeniRose
                        Sep 6 '17 at 16:16






                      • 3





                        Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                        – I am the Most Stupid Person
                        Feb 13 '18 at 11:34















                      60














                      It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link.



                      Here is the relevant portion that pertains to the Warning notice you are getting:




                      New E_WARNING and E_NOTICE errors have been introduced when invalid
                      strings are coerced using operators expecting numbers or their
                      assignment equivalents. An E_NOTICE is emitted when the string begins
                      with a numeric value but contains trailing non-numeric characters, and
                      an E_WARNING is emitted when the string does not contain a numeric
                      value.




                      I'm guessing either $item['quantity'] or $product['price'] does not contain a numeric value, so make sure that they do before trying to multiply them. Maybe use some sort of conditional before calculating the $sub_total, like so:



                      <?php

                      if (is_numeric($item['quantity']) && is_numeric($product['price']))
                      $sub_total += ($item['quantity'] * $product['price']);
                      else
                      // do some error handling...






                      share|improve this answer


















                      • 2





                        I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                        – M H
                        Jun 15 '17 at 15:24











                      • Is there a way to turn this warning off via php.ini?

                        – BeniRose
                        Aug 28 '17 at 16:49











                      • @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:33






                      • 1





                        Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                        – BeniRose
                        Sep 6 '17 at 16:16






                      • 3





                        Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                        – I am the Most Stupid Person
                        Feb 13 '18 at 11:34













                      60












                      60








                      60







                      It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link.



                      Here is the relevant portion that pertains to the Warning notice you are getting:




                      New E_WARNING and E_NOTICE errors have been introduced when invalid
                      strings are coerced using operators expecting numbers or their
                      assignment equivalents. An E_NOTICE is emitted when the string begins
                      with a numeric value but contains trailing non-numeric characters, and
                      an E_WARNING is emitted when the string does not contain a numeric
                      value.




                      I'm guessing either $item['quantity'] or $product['price'] does not contain a numeric value, so make sure that they do before trying to multiply them. Maybe use some sort of conditional before calculating the $sub_total, like so:



                      <?php

                      if (is_numeric($item['quantity']) && is_numeric($product['price']))
                      $sub_total += ($item['quantity'] * $product['price']);
                      else
                      // do some error handling...






                      share|improve this answer













                      It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link.



                      Here is the relevant portion that pertains to the Warning notice you are getting:




                      New E_WARNING and E_NOTICE errors have been introduced when invalid
                      strings are coerced using operators expecting numbers or their
                      assignment equivalents. An E_NOTICE is emitted when the string begins
                      with a numeric value but contains trailing non-numeric characters, and
                      an E_WARNING is emitted when the string does not contain a numeric
                      value.




                      I'm guessing either $item['quantity'] or $product['price'] does not contain a numeric value, so make sure that they do before trying to multiply them. Maybe use some sort of conditional before calculating the $sub_total, like so:



                      <?php

                      if (is_numeric($item['quantity']) && is_numeric($product['price']))
                      $sub_total += ($item['quantity'] * $product['price']);
                      else
                      // do some error handling...







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Feb 4 '17 at 19:07









                      Daniel.SchroederDaniel.Schroeder

                      1,3921715




                      1,3921715







                      • 2





                        I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                        – M H
                        Jun 15 '17 at 15:24











                      • Is there a way to turn this warning off via php.ini?

                        – BeniRose
                        Aug 28 '17 at 16:49











                      • @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:33






                      • 1





                        Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                        – BeniRose
                        Sep 6 '17 at 16:16






                      • 3





                        Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                        – I am the Most Stupid Person
                        Feb 13 '18 at 11:34












                      • 2





                        I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                        – M H
                        Jun 15 '17 at 15:24











                      • Is there a way to turn this warning off via php.ini?

                        – BeniRose
                        Aug 28 '17 at 16:49











                      • @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:33






                      • 1





                        Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                        – BeniRose
                        Sep 6 '17 at 16:16






                      • 3





                        Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                        – I am the Most Stupid Person
                        Feb 13 '18 at 11:34







                      2




                      2





                      I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                      – M H
                      Jun 15 '17 at 15:24





                      I had this issue because I still had a few plus signs in the asp I was transferring to PHP. Ctrl+f and look for + characters.

                      – M H
                      Jun 15 '17 at 15:24













                      Is there a way to turn this warning off via php.ini?

                      – BeniRose
                      Aug 28 '17 at 16:49





                      Is there a way to turn this warning off via php.ini?

                      – BeniRose
                      Aug 28 '17 at 16:49













                      @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                      – Daniel.Schroeder
                      Sep 2 '17 at 3:33





                      @BeniRose The warning will only be thrown if your trying to apply math to non-numeric values, so if you try to multiply the strings 'cat' * '10', it will throw the error. If you try '10' * '10', you'll get no warning and the int 100. Turning this one off might be a bad idea I think. Here are a few links to PHP docs that may help you if you want to turn this off though. php.net/manual/en/… php.net/manual/en/configuration.file.php

                      – Daniel.Schroeder
                      Sep 2 '17 at 3:33




                      1




                      1





                      Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                      – BeniRose
                      Sep 6 '17 at 16:16





                      Thanks. I'm working on a legacy Symfony 1.4 project, and it seems there's a few places this happens intentionally, which has been a pain. This really should be a flag in php.ini that allows you to turn off this level of strictness.

                      – BeniRose
                      Sep 6 '17 at 16:16




                      3




                      3





                      Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                      – I am the Most Stupid Person
                      Feb 13 '18 at 11:34





                      Alternatively you can use $sub_total += ((int)$item['quantity'] * (int)$product['price']);

                      – I am the Most Stupid Person
                      Feb 13 '18 at 11:34













                      90














                      Not exactly the issue you had but the same error for people searching.



                      This happened to me when I spent too much time on JavaScript.



                      Coming back to PHP I concatenated two strings with "+" instead of "." and got that error.






                      share|improve this answer

























                      • Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                        – namezero
                        Jan 9 at 16:36







                      • 2





                        This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                        – Dut A.
                        Jan 24 at 5:54






                      • 1





                        And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                        – imin
                        Feb 25 at 18:04






                      • 1





                        as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                        – Martin Zeitler
                        Mar 3 at 16:31
















                      90














                      Not exactly the issue you had but the same error for people searching.



                      This happened to me when I spent too much time on JavaScript.



                      Coming back to PHP I concatenated two strings with "+" instead of "." and got that error.






                      share|improve this answer

























                      • Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                        – namezero
                        Jan 9 at 16:36







                      • 2





                        This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                        – Dut A.
                        Jan 24 at 5:54






                      • 1





                        And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                        – imin
                        Feb 25 at 18:04






                      • 1





                        as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                        – Martin Zeitler
                        Mar 3 at 16:31














                      90












                      90








                      90







                      Not exactly the issue you had but the same error for people searching.



                      This happened to me when I spent too much time on JavaScript.



                      Coming back to PHP I concatenated two strings with "+" instead of "." and got that error.






                      share|improve this answer















                      Not exactly the issue you had but the same error for people searching.



                      This happened to me when I spent too much time on JavaScript.



                      Coming back to PHP I concatenated two strings with "+" instead of "." and got that error.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jan 6 at 6:07









                      NullPoiиteя

                      46.3k19108128




                      46.3k19108128










                      answered May 19 '17 at 9:58









                      Yassir EnnazkYassir Ennazk

                      2,59322336




                      2,59322336












                      • Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                        – namezero
                        Jan 9 at 16:36







                      • 2





                        This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                        – Dut A.
                        Jan 24 at 5:54






                      • 1





                        And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                        – imin
                        Feb 25 at 18:04






                      • 1





                        as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                        – Martin Zeitler
                        Mar 3 at 16:31


















                      • Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                        – namezero
                        Jan 9 at 16:36







                      • 2





                        This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                        – Dut A.
                        Jan 24 at 5:54






                      • 1





                        And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                        – imin
                        Feb 25 at 18:04






                      • 1





                        as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                        – Martin Zeitler
                        Mar 3 at 16:31

















                      Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                      – namezero
                      Jan 9 at 16:36






                      Crap I just scratched my head off and of course. I something like $a = "lorem" . $var-1 . "ipsum". Parenthesizing to $a = "lorem" . ($var-1) . "ipsum" fixed it.

                      – namezero
                      Jan 9 at 16:36





                      2




                      2





                      This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                      – Dut A.
                      Jan 24 at 5:54





                      This damn thing tripped me in 2019, LOL. PHP's string concatenation needs to be restructured!

                      – Dut A.
                      Jan 24 at 5:54




                      1




                      1





                      And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                      – imin
                      Feb 25 at 18:04





                      And here 2 weeks after doing nodejs and returning back to PHP I faced this error again lol

                      – imin
                      Feb 25 at 18:04




                      1




                      1





                      as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                      – Martin Zeitler
                      Mar 3 at 16:31






                      as soon as a string is being attempted to be concatenated with a +, it's being assumed that it is an int value... while the given operands aren't of any numeric data-type.

                      – Martin Zeitler
                      Mar 3 at 16:31












                      41














                      You can solve the problem without any new logic by just casting the thing into the number, which prevents the warning and is equivalent to the behavior in PHP 7.0 and below:



                      $sub_total += ((int)$item['quantity'] * (int)$product['price']);


                      (The answer from Daniel Schroeder is not equivalent because $sub_total would remain unset if non-numeric values are encountered. For example, if you print out $sub_total, you would get an empty string, which is probably wrong in an invoice. - by casting you make sure that $sub_total is an integer.)






                      share|improve this answer


















                      • 1





                        that's a bad practice. You need to filter your inputs

                        – Ciro Vargas
                        May 25 '17 at 3:47






                      • 3





                        This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                        – M H
                        Jun 15 '17 at 15:32






                      • 3





                        @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                        – Roland Seuhs
                        Jun 27 '17 at 12:24











                      • @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:10






                      • 2





                        Just (int)$var fixed for me on php 7.1.8 thank you

                        – user5247236
                        Sep 10 '17 at 14:31















                      41














                      You can solve the problem without any new logic by just casting the thing into the number, which prevents the warning and is equivalent to the behavior in PHP 7.0 and below:



                      $sub_total += ((int)$item['quantity'] * (int)$product['price']);


                      (The answer from Daniel Schroeder is not equivalent because $sub_total would remain unset if non-numeric values are encountered. For example, if you print out $sub_total, you would get an empty string, which is probably wrong in an invoice. - by casting you make sure that $sub_total is an integer.)






                      share|improve this answer


















                      • 1





                        that's a bad practice. You need to filter your inputs

                        – Ciro Vargas
                        May 25 '17 at 3:47






                      • 3





                        This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                        – M H
                        Jun 15 '17 at 15:32






                      • 3





                        @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                        – Roland Seuhs
                        Jun 27 '17 at 12:24











                      • @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:10






                      • 2





                        Just (int)$var fixed for me on php 7.1.8 thank you

                        – user5247236
                        Sep 10 '17 at 14:31













                      41












                      41








                      41







                      You can solve the problem without any new logic by just casting the thing into the number, which prevents the warning and is equivalent to the behavior in PHP 7.0 and below:



                      $sub_total += ((int)$item['quantity'] * (int)$product['price']);


                      (The answer from Daniel Schroeder is not equivalent because $sub_total would remain unset if non-numeric values are encountered. For example, if you print out $sub_total, you would get an empty string, which is probably wrong in an invoice. - by casting you make sure that $sub_total is an integer.)






                      share|improve this answer













                      You can solve the problem without any new logic by just casting the thing into the number, which prevents the warning and is equivalent to the behavior in PHP 7.0 and below:



                      $sub_total += ((int)$item['quantity'] * (int)$product['price']);


                      (The answer from Daniel Schroeder is not equivalent because $sub_total would remain unset if non-numeric values are encountered. For example, if you print out $sub_total, you would get an empty string, which is probably wrong in an invoice. - by casting you make sure that $sub_total is an integer.)







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 12 '17 at 7:11









                      Roland SeuhsRoland Seuhs

                      1,08241331




                      1,08241331







                      • 1





                        that's a bad practice. You need to filter your inputs

                        – Ciro Vargas
                        May 25 '17 at 3:47






                      • 3





                        This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                        – M H
                        Jun 15 '17 at 15:32






                      • 3





                        @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                        – Roland Seuhs
                        Jun 27 '17 at 12:24











                      • @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:10






                      • 2





                        Just (int)$var fixed for me on php 7.1.8 thank you

                        – user5247236
                        Sep 10 '17 at 14:31












                      • 1





                        that's a bad practice. You need to filter your inputs

                        – Ciro Vargas
                        May 25 '17 at 3:47






                      • 3





                        This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                        – M H
                        Jun 15 '17 at 15:32






                      • 3





                        @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                        – Roland Seuhs
                        Jun 27 '17 at 12:24











                      • @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                        – Daniel.Schroeder
                        Sep 2 '17 at 3:10






                      • 2





                        Just (int)$var fixed for me on php 7.1.8 thank you

                        – user5247236
                        Sep 10 '17 at 14:31







                      1




                      1





                      that's a bad practice. You need to filter your inputs

                      – Ciro Vargas
                      May 25 '17 at 3:47





                      that's a bad practice. You need to filter your inputs

                      – Ciro Vargas
                      May 25 '17 at 3:47




                      3




                      3





                      This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                      – M H
                      Jun 15 '17 at 15:32





                      This seems to be the best answer. And for all you know these values are coming from the database, you may not need to escape.

                      – M H
                      Jun 15 '17 at 15:32




                      3




                      3





                      @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                      – Roland Seuhs
                      Jun 27 '17 at 12:24





                      @Ciro Vargas: It depends on the application. In many cases you want an undefined integer to be interpreted as zero. Anyway this is the equivalent of the PHP7.0 behavior and does not require a rewrite of the code. (The accepted answer does require a rewrite.)

                      – Roland Seuhs
                      Jun 27 '17 at 12:24













                      @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                      – Daniel.Schroeder
                      Sep 2 '17 at 3:10





                      @RolandSeuhs I'm not sure I follow, when multiplying two strings, '24' * '10' will produce 240 in PHP, '24' * null will produce 0, but '24' * 'cat' will throw the error mentioned above because 'cat' is a non-numeric value. You can cast 'cat' to an int, but that won't give you a meaningful subtotal either. As for my solution, it works for determining whether quantity and price are numeric. If they are strings '24' and '10', it passes, but if either is a non-numeric string, it fails. How sub_total gets dealt with was not really my aim, sorry if it came off that way.

                      – Daniel.Schroeder
                      Sep 2 '17 at 3:10




                      2




                      2





                      Just (int)$var fixed for me on php 7.1.8 thank you

                      – user5247236
                      Sep 10 '17 at 14:31





                      Just (int)$var fixed for me on php 7.1.8 thank you

                      – user5247236
                      Sep 10 '17 at 14:31











                      11














                      In my case it was because of me used "+" as in other language but in PHP strings concatenation oprator is "." .






                      share|improve this answer



























                        11














                        In my case it was because of me used "+" as in other language but in PHP strings concatenation oprator is "." .






                        share|improve this answer

























                          11












                          11








                          11







                          In my case it was because of me used "+" as in other language but in PHP strings concatenation oprator is "." .






                          share|improve this answer













                          In my case it was because of me used "+" as in other language but in PHP strings concatenation oprator is "." .







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 24 '18 at 10:25









                          CodeToLifeCodeToLife

                          1,1091818




                          1,1091818





















                              5














                              This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:



                              In File:



                              C:amppsphpMyAdminlibrariesDisplayResults.class.php


                              I changed this:



                              // Move to the next page or to the last one
                              $endpos = $_SESSION['tmpval']['pos']
                              + $_SESSION['tmpval']['max_rows'];


                              To this:



                              $endpos = 0;
                              if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos']))
                              $endpos += $_SESSION['tmpval']['pos'];

                              if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows']))
                              $endpos += $_SESSION['tmpval']['max_rows'];



                              Hope that save's someone some trouble...






                              share|improve this answer



























                                5














                                This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:



                                In File:



                                C:amppsphpMyAdminlibrariesDisplayResults.class.php


                                I changed this:



                                // Move to the next page or to the last one
                                $endpos = $_SESSION['tmpval']['pos']
                                + $_SESSION['tmpval']['max_rows'];


                                To this:



                                $endpos = 0;
                                if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos']))
                                $endpos += $_SESSION['tmpval']['pos'];

                                if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows']))
                                $endpos += $_SESSION['tmpval']['max_rows'];



                                Hope that save's someone some trouble...






                                share|improve this answer

























                                  5












                                  5








                                  5







                                  This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:



                                  In File:



                                  C:amppsphpMyAdminlibrariesDisplayResults.class.php


                                  I changed this:



                                  // Move to the next page or to the last one
                                  $endpos = $_SESSION['tmpval']['pos']
                                  + $_SESSION['tmpval']['max_rows'];


                                  To this:



                                  $endpos = 0;
                                  if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos']))
                                  $endpos += $_SESSION['tmpval']['pos'];

                                  if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows']))
                                  $endpos += $_SESSION['tmpval']['max_rows'];



                                  Hope that save's someone some trouble...






                                  share|improve this answer













                                  This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:



                                  In File:



                                  C:amppsphpMyAdminlibrariesDisplayResults.class.php


                                  I changed this:



                                  // Move to the next page or to the last one
                                  $endpos = $_SESSION['tmpval']['pos']
                                  + $_SESSION['tmpval']['max_rows'];


                                  To this:



                                  $endpos = 0;
                                  if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos']))
                                  $endpos += $_SESSION['tmpval']['pos'];

                                  if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows']))
                                  $endpos += $_SESSION['tmpval']['max_rows'];



                                  Hope that save's someone some trouble...







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Feb 27 '18 at 5:15









                                  coderamacoderama

                                  5,11635135268




                                  5,11635135268





















                                      3














                                      I had this issue with my pagination forward and backward link .... simply set (int ) in front of the variable $Page+1 and it worked...



                                      <?php 
                                      $Page = (isset($_GET['Page']) ? $_GET['Page'] : '');
                                      if ((int)$Page+1<=$PostPagination)
                                      ?>
                                      <li> <a href="Index.php?Page=<?php echo $Page+1; ?>"> &raquo;</a></li>
                                      <?php
                                      ?>





                                      share|improve this answer



























                                        3














                                        I had this issue with my pagination forward and backward link .... simply set (int ) in front of the variable $Page+1 and it worked...



                                        <?php 
                                        $Page = (isset($_GET['Page']) ? $_GET['Page'] : '');
                                        if ((int)$Page+1<=$PostPagination)
                                        ?>
                                        <li> <a href="Index.php?Page=<?php echo $Page+1; ?>"> &raquo;</a></li>
                                        <?php
                                        ?>





                                        share|improve this answer

























                                          3












                                          3








                                          3







                                          I had this issue with my pagination forward and backward link .... simply set (int ) in front of the variable $Page+1 and it worked...



                                          <?php 
                                          $Page = (isset($_GET['Page']) ? $_GET['Page'] : '');
                                          if ((int)$Page+1<=$PostPagination)
                                          ?>
                                          <li> <a href="Index.php?Page=<?php echo $Page+1; ?>"> &raquo;</a></li>
                                          <?php
                                          ?>





                                          share|improve this answer













                                          I had this issue with my pagination forward and backward link .... simply set (int ) in front of the variable $Page+1 and it worked...



                                          <?php 
                                          $Page = (isset($_GET['Page']) ? $_GET['Page'] : '');
                                          if ((int)$Page+1<=$PostPagination)
                                          ?>
                                          <li> <a href="Index.php?Page=<?php echo $Page+1; ?>"> &raquo;</a></li>
                                          <?php
                                          ?>






                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Apr 28 '18 at 16:29









                                          bappibappi

                                          693




                                          693





















                                              2














                                              Check if you're not incrementing with some variable that its value is an empty string like ''.



                                              Example:



                                              $total = '';
                                              $integers = range(1, 5);

                                              foreach($integers as $integer)
                                              $total += $integer;






                                              share|improve this answer























                                              • Super, this is a case missed in most of the other answers.

                                                – Trendfischer
                                                Feb 28 at 16:37















                                              2














                                              Check if you're not incrementing with some variable that its value is an empty string like ''.



                                              Example:



                                              $total = '';
                                              $integers = range(1, 5);

                                              foreach($integers as $integer)
                                              $total += $integer;






                                              share|improve this answer























                                              • Super, this is a case missed in most of the other answers.

                                                – Trendfischer
                                                Feb 28 at 16:37













                                              2












                                              2








                                              2







                                              Check if you're not incrementing with some variable that its value is an empty string like ''.



                                              Example:



                                              $total = '';
                                              $integers = range(1, 5);

                                              foreach($integers as $integer)
                                              $total += $integer;






                                              share|improve this answer













                                              Check if you're not incrementing with some variable that its value is an empty string like ''.



                                              Example:



                                              $total = '';
                                              $integers = range(1, 5);

                                              foreach($integers as $integer)
                                              $total += $integer;







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Nov 21 '17 at 20:27









                                              Luiz Gustavo MartinsLuiz Gustavo Martins

                                              212




                                              212












                                              • Super, this is a case missed in most of the other answers.

                                                – Trendfischer
                                                Feb 28 at 16:37

















                                              • Super, this is a case missed in most of the other answers.

                                                – Trendfischer
                                                Feb 28 at 16:37
















                                              Super, this is a case missed in most of the other answers.

                                              – Trendfischer
                                              Feb 28 at 16:37





                                              Super, this is a case missed in most of the other answers.

                                              – Trendfischer
                                              Feb 28 at 16:37











                                              2














                                              I encountered the issue in phpmyadmin with PHP 7.3. Thanks @coderama, I changed libraries/DisplayResults.class.php line 855 from



                                              // Move to the next page or to the last one
                                              $endpos = $_SESSION['tmpval']['pos']
                                              + $_SESSION['tmpval']['max_rows'];


                                              into



                                              // Move to the next page or to the last one
                                              $endpos = (int)$_SESSION['tmpval']['pos']
                                              + (int)$_SESSION['tmpval']['max_rows'];


                                              Fixed.






                                              share|improve this answer



























                                                2














                                                I encountered the issue in phpmyadmin with PHP 7.3. Thanks @coderama, I changed libraries/DisplayResults.class.php line 855 from



                                                // Move to the next page or to the last one
                                                $endpos = $_SESSION['tmpval']['pos']
                                                + $_SESSION['tmpval']['max_rows'];


                                                into



                                                // Move to the next page or to the last one
                                                $endpos = (int)$_SESSION['tmpval']['pos']
                                                + (int)$_SESSION['tmpval']['max_rows'];


                                                Fixed.






                                                share|improve this answer

























                                                  2












                                                  2








                                                  2







                                                  I encountered the issue in phpmyadmin with PHP 7.3. Thanks @coderama, I changed libraries/DisplayResults.class.php line 855 from



                                                  // Move to the next page or to the last one
                                                  $endpos = $_SESSION['tmpval']['pos']
                                                  + $_SESSION['tmpval']['max_rows'];


                                                  into



                                                  // Move to the next page or to the last one
                                                  $endpos = (int)$_SESSION['tmpval']['pos']
                                                  + (int)$_SESSION['tmpval']['max_rows'];


                                                  Fixed.






                                                  share|improve this answer













                                                  I encountered the issue in phpmyadmin with PHP 7.3. Thanks @coderama, I changed libraries/DisplayResults.class.php line 855 from



                                                  // Move to the next page or to the last one
                                                  $endpos = $_SESSION['tmpval']['pos']
                                                  + $_SESSION['tmpval']['max_rows'];


                                                  into



                                                  // Move to the next page or to the last one
                                                  $endpos = (int)$_SESSION['tmpval']['pos']
                                                  + (int)$_SESSION['tmpval']['max_rows'];


                                                  Fixed.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Nov 24 '18 at 17:40









                                                  HenryHenry

                                                  439515




                                                  439515





















                                                      1














                                                      Try this.



                                                      $sub_total = 0;


                                                      and within your loop now you can use this



                                                      $sub_total += ($item['quantity'] * $product['price']);


                                                      It should solve your problem.






                                                      share|improve this answer



























                                                        1














                                                        Try this.



                                                        $sub_total = 0;


                                                        and within your loop now you can use this



                                                        $sub_total += ($item['quantity'] * $product['price']);


                                                        It should solve your problem.






                                                        share|improve this answer

























                                                          1












                                                          1








                                                          1







                                                          Try this.



                                                          $sub_total = 0;


                                                          and within your loop now you can use this



                                                          $sub_total += ($item['quantity'] * $product['price']);


                                                          It should solve your problem.






                                                          share|improve this answer













                                                          Try this.



                                                          $sub_total = 0;


                                                          and within your loop now you can use this



                                                          $sub_total += ($item['quantity'] * $product['price']);


                                                          It should solve your problem.







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered May 11 '17 at 22:09









                                                          WaddayWadday

                                                          314




                                                          314





















                                                              1














                                                              I just looked at this page as I had this issue. For me I had floating point numbers calculated from an array but even after designating the variables as floating points the error was still given, here's the simple fix and example code underneath which was causing the issue.



                                                              Example PHP



                                                              <?php
                                                              $subtotal = 0; //Warning fixed
                                                              $shippingtotal = 0; //Warning fixed

                                                              $price = array($row3['price']);
                                                              $shipping = array($row3['shipping']);
                                                              $values1 = array_sum($price);
                                                              $values2 = array_sum($shipping);
                                                              (float)$subtotal += $values1; // float is irrelevant $subtotal creates warning
                                                              (float)$shippingtotal += $values2; // float is irrelevant $shippingtotal creates warning
                                                              ?>





                                                              share|improve this answer



























                                                                1














                                                                I just looked at this page as I had this issue. For me I had floating point numbers calculated from an array but even after designating the variables as floating points the error was still given, here's the simple fix and example code underneath which was causing the issue.



                                                                Example PHP



                                                                <?php
                                                                $subtotal = 0; //Warning fixed
                                                                $shippingtotal = 0; //Warning fixed

                                                                $price = array($row3['price']);
                                                                $shipping = array($row3['shipping']);
                                                                $values1 = array_sum($price);
                                                                $values2 = array_sum($shipping);
                                                                (float)$subtotal += $values1; // float is irrelevant $subtotal creates warning
                                                                (float)$shippingtotal += $values2; // float is irrelevant $shippingtotal creates warning
                                                                ?>





                                                                share|improve this answer

























                                                                  1












                                                                  1








                                                                  1







                                                                  I just looked at this page as I had this issue. For me I had floating point numbers calculated from an array but even after designating the variables as floating points the error was still given, here's the simple fix and example code underneath which was causing the issue.



                                                                  Example PHP



                                                                  <?php
                                                                  $subtotal = 0; //Warning fixed
                                                                  $shippingtotal = 0; //Warning fixed

                                                                  $price = array($row3['price']);
                                                                  $shipping = array($row3['shipping']);
                                                                  $values1 = array_sum($price);
                                                                  $values2 = array_sum($shipping);
                                                                  (float)$subtotal += $values1; // float is irrelevant $subtotal creates warning
                                                                  (float)$shippingtotal += $values2; // float is irrelevant $shippingtotal creates warning
                                                                  ?>





                                                                  share|improve this answer













                                                                  I just looked at this page as I had this issue. For me I had floating point numbers calculated from an array but even after designating the variables as floating points the error was still given, here's the simple fix and example code underneath which was causing the issue.



                                                                  Example PHP



                                                                  <?php
                                                                  $subtotal = 0; //Warning fixed
                                                                  $shippingtotal = 0; //Warning fixed

                                                                  $price = array($row3['price']);
                                                                  $shipping = array($row3['shipping']);
                                                                  $values1 = array_sum($price);
                                                                  $values2 = array_sum($shipping);
                                                                  (float)$subtotal += $values1; // float is irrelevant $subtotal creates warning
                                                                  (float)$shippingtotal += $values2; // float is irrelevant $shippingtotal creates warning
                                                                  ?>






                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Nov 28 '17 at 0:05







                                                                  user5340092




























                                                                      1














                                                                      $sn = 0;//increment the serial number, then add the sn to job
                                                                      for($x = 0; $x<20; $x++)

                                                                      $sn++;
                                                                      $added_date = "10/10/10";
                                                                      $job_title = "new job";
                                                                      $salary = $sn*1000;
                                                                      $cd = "27/10/2017";//the closing date
                                                                      $ins = "some institution";//the institution for the vacancy
                                                                      $notes = "some notes here";//any notes about the jobs

                                                                      $sn_div = "<div class='sn_div'>".$sn."</div>";
                                                                      $ad_div = "<div class='ad_div'>".$added_date."</div>";
                                                                      $job_div = "<div class='job_div'>".$job_title."</div>";
                                                                      $salary_div = "<div class='salary_div'>".$salary."</div>";
                                                                      $cd_div = "<div class='cd_div'>".$cd."</div>";//cd means closing date
                                                                      $ins_div = "<div class='ins_div'>".$ins."</div>";//ins means institution
                                                                      $notes_div = "<div class='notes_div'>".$notes."</div>";


                                                                      /*erroneous line*/$job_no = "job"+$sn;//to create the job rows
                                                                      $$job_no = "<div class='job_wrapper'>".$sn_div.$ad_div.$job_div.$salary_div.$cd_div.$ins_div.$notes_div."</div>";

                                                                      echo $$job_no;//and then echo each job




                                                                      that's the code I had which looped and created new html div elements. The code worked fine and the elements were formed, but i got the same warning in the error_log.



                                                                      After reading the useful other answers, I figured that I was summing up a string and a number in the erroneous line. So I changed the code at that line to



                                                                      /*erroneous line*/$job_no = "job"&&$sn;//this is the new variable that will create the job rows


                                                                      Now the code works as earlier but with no warnings this time. Hope this example would be useful to someone.






                                                                      share|improve this answer



























                                                                        1














                                                                        $sn = 0;//increment the serial number, then add the sn to job
                                                                        for($x = 0; $x<20; $x++)

                                                                        $sn++;
                                                                        $added_date = "10/10/10";
                                                                        $job_title = "new job";
                                                                        $salary = $sn*1000;
                                                                        $cd = "27/10/2017";//the closing date
                                                                        $ins = "some institution";//the institution for the vacancy
                                                                        $notes = "some notes here";//any notes about the jobs

                                                                        $sn_div = "<div class='sn_div'>".$sn."</div>";
                                                                        $ad_div = "<div class='ad_div'>".$added_date."</div>";
                                                                        $job_div = "<div class='job_div'>".$job_title."</div>";
                                                                        $salary_div = "<div class='salary_div'>".$salary."</div>";
                                                                        $cd_div = "<div class='cd_div'>".$cd."</div>";//cd means closing date
                                                                        $ins_div = "<div class='ins_div'>".$ins."</div>";//ins means institution
                                                                        $notes_div = "<div class='notes_div'>".$notes."</div>";


                                                                        /*erroneous line*/$job_no = "job"+$sn;//to create the job rows
                                                                        $$job_no = "<div class='job_wrapper'>".$sn_div.$ad_div.$job_div.$salary_div.$cd_div.$ins_div.$notes_div."</div>";

                                                                        echo $$job_no;//and then echo each job




                                                                        that's the code I had which looped and created new html div elements. The code worked fine and the elements were formed, but i got the same warning in the error_log.



                                                                        After reading the useful other answers, I figured that I was summing up a string and a number in the erroneous line. So I changed the code at that line to



                                                                        /*erroneous line*/$job_no = "job"&&$sn;//this is the new variable that will create the job rows


                                                                        Now the code works as earlier but with no warnings this time. Hope this example would be useful to someone.






                                                                        share|improve this answer

























                                                                          1












                                                                          1








                                                                          1







                                                                          $sn = 0;//increment the serial number, then add the sn to job
                                                                          for($x = 0; $x<20; $x++)

                                                                          $sn++;
                                                                          $added_date = "10/10/10";
                                                                          $job_title = "new job";
                                                                          $salary = $sn*1000;
                                                                          $cd = "27/10/2017";//the closing date
                                                                          $ins = "some institution";//the institution for the vacancy
                                                                          $notes = "some notes here";//any notes about the jobs

                                                                          $sn_div = "<div class='sn_div'>".$sn."</div>";
                                                                          $ad_div = "<div class='ad_div'>".$added_date."</div>";
                                                                          $job_div = "<div class='job_div'>".$job_title."</div>";
                                                                          $salary_div = "<div class='salary_div'>".$salary."</div>";
                                                                          $cd_div = "<div class='cd_div'>".$cd."</div>";//cd means closing date
                                                                          $ins_div = "<div class='ins_div'>".$ins."</div>";//ins means institution
                                                                          $notes_div = "<div class='notes_div'>".$notes."</div>";


                                                                          /*erroneous line*/$job_no = "job"+$sn;//to create the job rows
                                                                          $$job_no = "<div class='job_wrapper'>".$sn_div.$ad_div.$job_div.$salary_div.$cd_div.$ins_div.$notes_div."</div>";

                                                                          echo $$job_no;//and then echo each job




                                                                          that's the code I had which looped and created new html div elements. The code worked fine and the elements were formed, but i got the same warning in the error_log.



                                                                          After reading the useful other answers, I figured that I was summing up a string and a number in the erroneous line. So I changed the code at that line to



                                                                          /*erroneous line*/$job_no = "job"&&$sn;//this is the new variable that will create the job rows


                                                                          Now the code works as earlier but with no warnings this time. Hope this example would be useful to someone.






                                                                          share|improve this answer













                                                                          $sn = 0;//increment the serial number, then add the sn to job
                                                                          for($x = 0; $x<20; $x++)

                                                                          $sn++;
                                                                          $added_date = "10/10/10";
                                                                          $job_title = "new job";
                                                                          $salary = $sn*1000;
                                                                          $cd = "27/10/2017";//the closing date
                                                                          $ins = "some institution";//the institution for the vacancy
                                                                          $notes = "some notes here";//any notes about the jobs

                                                                          $sn_div = "<div class='sn_div'>".$sn."</div>";
                                                                          $ad_div = "<div class='ad_div'>".$added_date."</div>";
                                                                          $job_div = "<div class='job_div'>".$job_title."</div>";
                                                                          $salary_div = "<div class='salary_div'>".$salary."</div>";
                                                                          $cd_div = "<div class='cd_div'>".$cd."</div>";//cd means closing date
                                                                          $ins_div = "<div class='ins_div'>".$ins."</div>";//ins means institution
                                                                          $notes_div = "<div class='notes_div'>".$notes."</div>";


                                                                          /*erroneous line*/$job_no = "job"+$sn;//to create the job rows
                                                                          $$job_no = "<div class='job_wrapper'>".$sn_div.$ad_div.$job_div.$salary_div.$cd_div.$ins_div.$notes_div."</div>";

                                                                          echo $$job_no;//and then echo each job




                                                                          that's the code I had which looped and created new html div elements. The code worked fine and the elements were formed, but i got the same warning in the error_log.



                                                                          After reading the useful other answers, I figured that I was summing up a string and a number in the erroneous line. So I changed the code at that line to



                                                                          /*erroneous line*/$job_no = "job"&&$sn;//this is the new variable that will create the job rows


                                                                          Now the code works as earlier but with no warnings this time. Hope this example would be useful to someone.







                                                                          share|improve this answer












                                                                          share|improve this answer



                                                                          share|improve this answer










                                                                          answered Nov 28 '17 at 3:00









                                                                          NeoNeo

                                                                          367212




                                                                          367212





















                                                                              1














                                                                              Solve this error on WordPress




                                                                              Warning: A non-numeric value encountered in C:XAMPPhtdocsaad-2wp-includesSimplePieParseDate.php on line 694




                                                                              Simple solution here!



                                                                              1. locate a file of wp-includesSimplePieParseDate.php

                                                                              2. find a line no. 694

                                                                              3. you show the code $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

                                                                              4. and change this 3.) to this line $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));





                                                                              share|improve this answer





























                                                                                1














                                                                                Solve this error on WordPress




                                                                                Warning: A non-numeric value encountered in C:XAMPPhtdocsaad-2wp-includesSimplePieParseDate.php on line 694




                                                                                Simple solution here!



                                                                                1. locate a file of wp-includesSimplePieParseDate.php

                                                                                2. find a line no. 694

                                                                                3. you show the code $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

                                                                                4. and change this 3.) to this line $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));





                                                                                share|improve this answer



























                                                                                  1












                                                                                  1








                                                                                  1







                                                                                  Solve this error on WordPress




                                                                                  Warning: A non-numeric value encountered in C:XAMPPhtdocsaad-2wp-includesSimplePieParseDate.php on line 694




                                                                                  Simple solution here!



                                                                                  1. locate a file of wp-includesSimplePieParseDate.php

                                                                                  2. find a line no. 694

                                                                                  3. you show the code $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

                                                                                  4. and change this 3.) to this line $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));





                                                                                  share|improve this answer















                                                                                  Solve this error on WordPress




                                                                                  Warning: A non-numeric value encountered in C:XAMPPhtdocsaad-2wp-includesSimplePieParseDate.php on line 694




                                                                                  Simple solution here!



                                                                                  1. locate a file of wp-includesSimplePieParseDate.php

                                                                                  2. find a line no. 694

                                                                                  3. you show the code $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

                                                                                  4. and change this 3.) to this line $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));






                                                                                  share|improve this answer














                                                                                  share|improve this answer



                                                                                  share|improve this answer








                                                                                  edited Feb 16 '18 at 14:00









                                                                                  slavoo

                                                                                  4,018122936




                                                                                  4,018122936










                                                                                  answered Feb 16 '18 at 13:37









                                                                                  Nasirkhan PathanNasirkhan Pathan

                                                                                  115




                                                                                  115





















                                                                                      1














                                                                                      $sub_total_price = 0; 

                                                                                      foreach($booking_list as $key=>$value)
                                                                                      $sub_total_price += ($price * $quantity);


                                                                                      echo $sub_total_price;


                                                                                      it's working 100% :)






                                                                                      share|improve this answer





























                                                                                        1














                                                                                        $sub_total_price = 0; 

                                                                                        foreach($booking_list as $key=>$value)
                                                                                        $sub_total_price += ($price * $quantity);


                                                                                        echo $sub_total_price;


                                                                                        it's working 100% :)






                                                                                        share|improve this answer



























                                                                                          1












                                                                                          1








                                                                                          1







                                                                                          $sub_total_price = 0; 

                                                                                          foreach($booking_list as $key=>$value)
                                                                                          $sub_total_price += ($price * $quantity);


                                                                                          echo $sub_total_price;


                                                                                          it's working 100% :)






                                                                                          share|improve this answer















                                                                                          $sub_total_price = 0; 

                                                                                          foreach($booking_list as $key=>$value)
                                                                                          $sub_total_price += ($price * $quantity);


                                                                                          echo $sub_total_price;


                                                                                          it's working 100% :)







                                                                                          share|improve this answer














                                                                                          share|improve this answer



                                                                                          share|improve this answer








                                                                                          edited Apr 24 '18 at 7:21









                                                                                          Pankaj Makwana

                                                                                          2,55561942




                                                                                          2,55561942










                                                                                          answered Apr 24 '18 at 7:01









                                                                                          Imran ImuImran Imu

                                                                                          111




                                                                                          111





















                                                                                              1














                                                                                              That's happen usually when you con-cat strings with + sign. In PHP you can make concatenation using dot sign (.) So sometimes I accidentally put + sign between two strings in PHP, and it show me this error, since you can use + sign in numbers only.






                                                                                              share|improve this answer



























                                                                                                1














                                                                                                That's happen usually when you con-cat strings with + sign. In PHP you can make concatenation using dot sign (.) So sometimes I accidentally put + sign between two strings in PHP, and it show me this error, since you can use + sign in numbers only.






                                                                                                share|improve this answer

























                                                                                                  1












                                                                                                  1








                                                                                                  1







                                                                                                  That's happen usually when you con-cat strings with + sign. In PHP you can make concatenation using dot sign (.) So sometimes I accidentally put + sign between two strings in PHP, and it show me this error, since you can use + sign in numbers only.






                                                                                                  share|improve this answer













                                                                                                  That's happen usually when you con-cat strings with + sign. In PHP you can make concatenation using dot sign (.) So sometimes I accidentally put + sign between two strings in PHP, and it show me this error, since you can use + sign in numbers only.







                                                                                                  share|improve this answer












                                                                                                  share|improve this answer



                                                                                                  share|improve this answer










                                                                                                  answered Jul 22 '18 at 0:08









                                                                                                  ASammourASammour

                                                                                                  26727




                                                                                                  26727















                                                                                                      protected by Obsidian Age Feb 10 at 20:46



                                                                                                      Thank you for your interest in this question.
                                                                                                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                                      Would you like to answer one of these unanswered questions instead?



                                                                                                      Popular posts from this blog

                                                                                                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                                                                                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                                                                                                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현