Using GET to pass arguments to PHP function [duplicate]2019 Community Moderator ElectionFatal error: Uncaught ArgumentCountError: Too few arguments to functionHow can I prevent SQL injection in PHP?PHP: Delete an element from an arraystartsWith() and endsWith() functions in PHPHow do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?Get the full URL in PHPHow does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?
What is the purpose of a disclaimer like "this is not legal advice"?
Rationale to prefer local variables over instance variables?
What would be the most expensive material to an intergalactic society?
Why do phishing e-mails use faked e-mail addresses instead of the real one?
Either of .... (Plural/Singular)
Has a sovereign Communist government ever run, and conceded loss, on a fair election?
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
Graphic representation of a triangle using ArrayPlot
How do I raise a figure (placed with wrapfig) to be flush with the top of a paragraph?
If nine coins are tossed, what is the probability that the number of heads is even?
Automaton recognizing ambiguously accepted words of another automaton
When an outsider describes family relationships, which point of view are they using?
"If + would" conditional in present perfect tense
Trocar background-image com delay via jQuery
Translation of 答えを知っている人はいませんでした
(Codewars) Linked Lists-Sorted Insert
Are these two graphs isomorphic? Why/Why not?
Converting from "matrix" data into "coordinate" data
Create chunks from an array
Sampling from Gaussian mixture models, when are the sampled data independent?
Can I negotiate a patent idea for a raise, under French law?
Would those living in a "perfect society" not understand satire
Does an unused member variable take up memory?
Are E natural minor and B harmonic minor related?
Using GET to pass arguments to PHP function [duplicate]
2019 Community Moderator ElectionFatal error: Uncaught ArgumentCountError: Too few arguments to functionHow can I prevent SQL injection in PHP?PHP: Delete an element from an arraystartsWith() and endsWith() functions in PHPHow do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?Get the full URL in PHPHow does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?
This question already has an answer here:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
3 answers
Inherited a website that has a calculator form running that broke when host updated server to PHP7.2 from 5.6. Looking at error logs the issue seems to be with passing the $data to the function correctly.
The error that I am getting is
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee()
It says that it is getting 1 argument but expecting 2. In my browser I can see the 500 error on the URL that clearly shows 2 values for data.
My initial guess is either that the GET isn't working correctly, or that it isn't building the data into an array correctly.
Here is the PHP in question.
It all starts with:
$action = $_GET['action'];
$json_data = array();
$json_data['error_code'] = '0';
// Determine the action that the javascript is attempting to perform
switch ($action)
case "display_main_menu":
case "back":
$json_data['html'] = display_main_menu();
break;
case "display_purchase_example":
$json_data['html'] = display_purchase_example();
break;
case "display_refinance_example":
$json_data['html'] = display_refinance_example();
break;
case "calculate":
$post_data = $_GET['data'];
$json_data['calc_data'] = calculate($post_data);
break;
echo json_encode($json_data);
The form is then sending:
urltophp.php?action=calculate&data%5B%5D=80000&data%5B%5D=90000
Here is the calculate function:
function calculate($data)
$calc_data = array();
$title_premium = CalculateTitleFee(floatval($data[1])) + CalculateLoanPolicy(floatval($data[0]));
$title_premium_refi = CalculateTitleFeeRefi(floatval($data[0]));
That function has a lot going on that I didn't copy, but the error is happening CalculateTitleFee() function. Hoping to resolve that and everything else works correctly.
===== UPDATE =====
Here is the CalculateTitleFee function.
function CalculateTitleFee ($purchase_price, $loan_amount)
$title_premium0 = 0;
if ($purchase_price <= "100000")
$title_premium0 = ((ceil((($purchase_price-30000)*0.00375)+180)-(ceil((($purchase_price-30000)*0.00325)+150)))+100);
else if ($purchase_price <= "200000")
$title_premium0 = ((ceil((($purchase_price-100000)*0.00275)+442.5)-(ceil((($purchase_price-100000)*0.00225)+377.5)))+100);
else if ($purchase_price <= "300000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
else if ($purchase_price <= "10000000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
return $title_premium0;
php forms
marked as duplicate by Martin, Machavity
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 6 at 23:47
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
3 answers
Inherited a website that has a calculator form running that broke when host updated server to PHP7.2 from 5.6. Looking at error logs the issue seems to be with passing the $data to the function correctly.
The error that I am getting is
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee()
It says that it is getting 1 argument but expecting 2. In my browser I can see the 500 error on the URL that clearly shows 2 values for data.
My initial guess is either that the GET isn't working correctly, or that it isn't building the data into an array correctly.
Here is the PHP in question.
It all starts with:
$action = $_GET['action'];
$json_data = array();
$json_data['error_code'] = '0';
// Determine the action that the javascript is attempting to perform
switch ($action)
case "display_main_menu":
case "back":
$json_data['html'] = display_main_menu();
break;
case "display_purchase_example":
$json_data['html'] = display_purchase_example();
break;
case "display_refinance_example":
$json_data['html'] = display_refinance_example();
break;
case "calculate":
$post_data = $_GET['data'];
$json_data['calc_data'] = calculate($post_data);
break;
echo json_encode($json_data);
The form is then sending:
urltophp.php?action=calculate&data%5B%5D=80000&data%5B%5D=90000
Here is the calculate function:
function calculate($data)
$calc_data = array();
$title_premium = CalculateTitleFee(floatval($data[1])) + CalculateLoanPolicy(floatval($data[0]));
$title_premium_refi = CalculateTitleFeeRefi(floatval($data[0]));
That function has a lot going on that I didn't copy, but the error is happening CalculateTitleFee() function. Hoping to resolve that and everything else works correctly.
===== UPDATE =====
Here is the CalculateTitleFee function.
function CalculateTitleFee ($purchase_price, $loan_amount)
$title_premium0 = 0;
if ($purchase_price <= "100000")
$title_premium0 = ((ceil((($purchase_price-30000)*0.00375)+180)-(ceil((($purchase_price-30000)*0.00325)+150)))+100);
else if ($purchase_price <= "200000")
$title_premium0 = ((ceil((($purchase_price-100000)*0.00275)+442.5)-(ceil((($purchase_price-100000)*0.00225)+377.5)))+100);
else if ($purchase_price <= "300000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
else if ($purchase_price <= "10000000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
return $title_premium0;
php forms
marked as duplicate by Martin, Machavity
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 6 at 23:47
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
CalculateTitleFee
really is only getting one argument in thatcalculate()
function.
– Don't Panic
Mar 6 at 23:17
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
1
wellCalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...
– tim
Mar 6 at 23:24
add a comment |
This question already has an answer here:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
3 answers
Inherited a website that has a calculator form running that broke when host updated server to PHP7.2 from 5.6. Looking at error logs the issue seems to be with passing the $data to the function correctly.
The error that I am getting is
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee()
It says that it is getting 1 argument but expecting 2. In my browser I can see the 500 error on the URL that clearly shows 2 values for data.
My initial guess is either that the GET isn't working correctly, or that it isn't building the data into an array correctly.
Here is the PHP in question.
It all starts with:
$action = $_GET['action'];
$json_data = array();
$json_data['error_code'] = '0';
// Determine the action that the javascript is attempting to perform
switch ($action)
case "display_main_menu":
case "back":
$json_data['html'] = display_main_menu();
break;
case "display_purchase_example":
$json_data['html'] = display_purchase_example();
break;
case "display_refinance_example":
$json_data['html'] = display_refinance_example();
break;
case "calculate":
$post_data = $_GET['data'];
$json_data['calc_data'] = calculate($post_data);
break;
echo json_encode($json_data);
The form is then sending:
urltophp.php?action=calculate&data%5B%5D=80000&data%5B%5D=90000
Here is the calculate function:
function calculate($data)
$calc_data = array();
$title_premium = CalculateTitleFee(floatval($data[1])) + CalculateLoanPolicy(floatval($data[0]));
$title_premium_refi = CalculateTitleFeeRefi(floatval($data[0]));
That function has a lot going on that I didn't copy, but the error is happening CalculateTitleFee() function. Hoping to resolve that and everything else works correctly.
===== UPDATE =====
Here is the CalculateTitleFee function.
function CalculateTitleFee ($purchase_price, $loan_amount)
$title_premium0 = 0;
if ($purchase_price <= "100000")
$title_premium0 = ((ceil((($purchase_price-30000)*0.00375)+180)-(ceil((($purchase_price-30000)*0.00325)+150)))+100);
else if ($purchase_price <= "200000")
$title_premium0 = ((ceil((($purchase_price-100000)*0.00275)+442.5)-(ceil((($purchase_price-100000)*0.00225)+377.5)))+100);
else if ($purchase_price <= "300000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
else if ($purchase_price <= "10000000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
return $title_premium0;
php forms
This question already has an answer here:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
3 answers
Inherited a website that has a calculator form running that broke when host updated server to PHP7.2 from 5.6. Looking at error logs the issue seems to be with passing the $data to the function correctly.
The error that I am getting is
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee()
It says that it is getting 1 argument but expecting 2. In my browser I can see the 500 error on the URL that clearly shows 2 values for data.
My initial guess is either that the GET isn't working correctly, or that it isn't building the data into an array correctly.
Here is the PHP in question.
It all starts with:
$action = $_GET['action'];
$json_data = array();
$json_data['error_code'] = '0';
// Determine the action that the javascript is attempting to perform
switch ($action)
case "display_main_menu":
case "back":
$json_data['html'] = display_main_menu();
break;
case "display_purchase_example":
$json_data['html'] = display_purchase_example();
break;
case "display_refinance_example":
$json_data['html'] = display_refinance_example();
break;
case "calculate":
$post_data = $_GET['data'];
$json_data['calc_data'] = calculate($post_data);
break;
echo json_encode($json_data);
The form is then sending:
urltophp.php?action=calculate&data%5B%5D=80000&data%5B%5D=90000
Here is the calculate function:
function calculate($data)
$calc_data = array();
$title_premium = CalculateTitleFee(floatval($data[1])) + CalculateLoanPolicy(floatval($data[0]));
$title_premium_refi = CalculateTitleFeeRefi(floatval($data[0]));
That function has a lot going on that I didn't copy, but the error is happening CalculateTitleFee() function. Hoping to resolve that and everything else works correctly.
===== UPDATE =====
Here is the CalculateTitleFee function.
function CalculateTitleFee ($purchase_price, $loan_amount)
$title_premium0 = 0;
if ($purchase_price <= "100000")
$title_premium0 = ((ceil((($purchase_price-30000)*0.00375)+180)-(ceil((($purchase_price-30000)*0.00325)+150)))+100);
else if ($purchase_price <= "200000")
$title_premium0 = ((ceil((($purchase_price-100000)*0.00275)+442.5)-(ceil((($purchase_price-100000)*0.00225)+377.5)))+100);
else if ($purchase_price <= "300000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
else if ($purchase_price <= "10000000")
$title_premium0 = ((ceil((($purchase_price-200000)*0.002)+717.5)-(ceil((($purchase_price-200000)*0.00175)+602.5)))+100);
return $title_premium0;
This question already has an answer here:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
3 answers
php forms
php forms
edited Mar 6 at 23:23
C Porter
asked Mar 6 at 23:13
C PorterC Porter
275
275
marked as duplicate by Martin, Machavity
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 6 at 23:47
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Martin, Machavity
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 6 at 23:47
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
CalculateTitleFee
really is only getting one argument in thatcalculate()
function.
– Don't Panic
Mar 6 at 23:17
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
1
wellCalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...
– tim
Mar 6 at 23:24
add a comment |
1
CalculateTitleFee
really is only getting one argument in thatcalculate()
function.
– Don't Panic
Mar 6 at 23:17
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
1
wellCalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...
– tim
Mar 6 at 23:24
1
1
CalculateTitleFee
really is only getting one argument in that calculate()
function.– Don't Panic
Mar 6 at 23:17
CalculateTitleFee
really is only getting one argument in that calculate()
function.– Don't Panic
Mar 6 at 23:17
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
1
1
well
CalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...– tim
Mar 6 at 23:24
well
CalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...– tim
Mar 6 at 23:24
add a comment |
1 Answer
1
active
oldest
votes
This is not because of $_GET
. This was always a problem, but only started throwing an exception when you updated to PHP 7. Too few arguments used to cause a warning, as of PHP 7.1 it causes an error.
In your calculate()
function, you are calling CalculateTitleFee
with only one argument.
CalculateTitleFee(floatval($data[1]))
CalculateTitleFee()
does take a second argument, but it is never used in the function. It should be safe to remove that parameter from the function definition.
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into theCalculateLoanPolicy
function and they forgot to remove the variable? Who knows
– Don't Panic
Mar 6 at 23:30
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is not because of $_GET
. This was always a problem, but only started throwing an exception when you updated to PHP 7. Too few arguments used to cause a warning, as of PHP 7.1 it causes an error.
In your calculate()
function, you are calling CalculateTitleFee
with only one argument.
CalculateTitleFee(floatval($data[1]))
CalculateTitleFee()
does take a second argument, but it is never used in the function. It should be safe to remove that parameter from the function definition.
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into theCalculateLoanPolicy
function and they forgot to remove the variable? Who knows
– Don't Panic
Mar 6 at 23:30
add a comment |
This is not because of $_GET
. This was always a problem, but only started throwing an exception when you updated to PHP 7. Too few arguments used to cause a warning, as of PHP 7.1 it causes an error.
In your calculate()
function, you are calling CalculateTitleFee
with only one argument.
CalculateTitleFee(floatval($data[1]))
CalculateTitleFee()
does take a second argument, but it is never used in the function. It should be safe to remove that parameter from the function definition.
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into theCalculateLoanPolicy
function and they forgot to remove the variable? Who knows
– Don't Panic
Mar 6 at 23:30
add a comment |
This is not because of $_GET
. This was always a problem, but only started throwing an exception when you updated to PHP 7. Too few arguments used to cause a warning, as of PHP 7.1 it causes an error.
In your calculate()
function, you are calling CalculateTitleFee
with only one argument.
CalculateTitleFee(floatval($data[1]))
CalculateTitleFee()
does take a second argument, but it is never used in the function. It should be safe to remove that parameter from the function definition.
This is not because of $_GET
. This was always a problem, but only started throwing an exception when you updated to PHP 7. Too few arguments used to cause a warning, as of PHP 7.1 it causes an error.
In your calculate()
function, you are calling CalculateTitleFee
with only one argument.
CalculateTitleFee(floatval($data[1]))
CalculateTitleFee()
does take a second argument, but it is never used in the function. It should be safe to remove that parameter from the function definition.
edited Mar 6 at 23:27
answered Mar 6 at 23:19
Don't PanicDon't Panic
29.8k93958
29.8k93958
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into theCalculateLoanPolicy
function and they forgot to remove the variable? Who knows
– Don't Panic
Mar 6 at 23:30
add a comment |
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into theCalculateLoanPolicy
function and they forgot to remove the variable? Who knows
– Don't Panic
Mar 6 at 23:30
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
That makes sense. However the function was calculating correctly in the past I assume. I've added that function to my OP. Hopefully that helps diagnose. Thanks!
– C Porter
Mar 6 at 23:24
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Figured it out. By.... looking at the function.... which you said. Ha! IDK why it was requiring two variables when it was only using one in the function. Thanks!
– C Porter
Mar 6 at 23:26
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Ah, just updated the answer to say that at the same time :-)
– Don't Panic
Mar 6 at 23:27
Maybe the functionality that required that variable was moved into the
CalculateLoanPolicy
function and they forgot to remove the variable? Who knows– Don't Panic
Mar 6 at 23:30
Maybe the functionality that required that variable was moved into the
CalculateLoanPolicy
function and they forgot to remove the variable? Who knows– Don't Panic
Mar 6 at 23:30
add a comment |
1
CalculateTitleFee
really is only getting one argument in thatcalculate()
function.– Don't Panic
Mar 6 at 23:17
ArtisticPhoenix - results in same error. PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CalculateTitleFee(), 1 passed in /calculator/calculator.php on line 147 and exactly 2 expected in /calculator/calculator.php:78nStack trace:n#0 /calculator/calculator.php(147): CalculateTitleFee(90000)n#1 /calculator/calculator.php(25): calculate(Array)n#2 mainn thrown in /calculator/calculator.php on line 78, referer: calculator/calculator.html
– C Porter
Mar 6 at 23:22
1
well
CalculateTitleFee()
clear takes 2 arguments, you give it one, so um ...– tim
Mar 6 at 23:24