FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Sending nothing when function expects variable
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Sending nothing when function expects variable [message #178961] Tue, 28 August 2012 06:51 Go to previous message
jwcarlton is currently offline  jwcarlton
Messages: 76
Registered: December 2010
Karma:
Member
I have a function like:

function whatever($a, $b, $c) {
if (!$b) $b = "something";
if (!$c) $c = "something else";

// etc
}

Since I'm checking for $b and $c in the function, I call the functions like this when $b and $c are going to be the defaults:

whatever('this thing');

But then in the error log, I get these warnings:

PHP Warning: Missing argument 2 for q()...
PHP Warning: Missing argument 3 for q()...

Does this mean that I need to go back through all of the scripts (dozens of them) and change all of the whatever() references to:

whatever('this thing', false, false);

or is there a way to set PHP to ignore this warning by default?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can i know the propery of a javascript object how can i see what object inclue
Next Topic: Folder Permissions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 00:22:32 GMT 2024

Total time taken to generate the page: 0.04409 seconds