Title: PHP error due to missing function argument
Last modified: August 30, 2016

---

# PHP error due to missing function argument

 *  [zachary.lv](https://wordpress.org/support/users/zacharylv/)
 * (@zacharylv)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/php-error-due-to-missing-function-argument/)
 * The function get_leads on line 1961 of gravity-forms-addons.php has 15 arguments.
   The last argument $search_criterias has not been assigned a default value in 
   the function arguments. An array is supplied as a default inside the function
   definition, however, since no default is specified in the function declaration,
   PHP throws an error when the function is later called on line 2893 with only 
   14 arguments supplied in the call.
 * Can you please assign a default value to the argument in the function declaration,
   if it is intended to be optional, or provide a 15th argument when the function
   is called?
 * I have corrected it in my local install, but wanted to alert you so you can make
   the update for future releases.
 * Thank you
 * [https://wordpress.org/plugins/gravity-forms-addons/](https://wordpress.org/plugins/gravity-forms-addons/)

The topic ‘PHP error due to missing function argument’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-addons/assets/icon-256x256.jpg?rev=996787)
 * [Gravity Forms Directory](https://wordpress.org/plugins/gravity-forms-addons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-addons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-addons/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-addons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-addons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-addons/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [zachary.lv](https://wordpress.org/support/users/zacharylv/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/php-error-due-to-missing-function-argument/)
 * Status: not resolved