Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Missing argument warning, even though arg exists and is used

    Hi Folks,

    I'm getting an error saying an argument is missing, even though it appears to be read correctly by the function:

    Warning: Missing argument 9 for myfunction() in path/myscript.php on line 103

    But argument 9 is then read and used correctly in the function.

    As a temporary 'solution' I've just suppressed the error by prepending a '@' to the function name when called, but I'm at a loss to understand this.

    Does anyone have any ideas as the the cause?

    Thanks in advance.

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,026
    Thanks
    2
    Thanked 315 Times in 307 Posts
    You would need to post the function definition and the function call that is triggering the error for anyone in a Forum to have any chance of helping you.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My apologies, I should have thought of that.

    And in the process of replying I spotted my error (a different variable was missing when I called function, but the warning just related to the last of the variables).

    Sorry if I've wasted anyone's time - I'm going to leave it until tomorrow when hopefully I'm not so dopey!

    Thanks,
    Drexl


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •