SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist GeekSupport's Avatar
    Join Date
    May 2002
    Location
    Southern California
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fatal error undefined function (in a class)

    Ok,

    I have a weird error
    Fatal error: Call to undefined function: delete_form_choices() in /hsphere/local/home/user111/includes/domain.com/beta-survey-include/load_store_class.inc.php on line 522
    PHP Code:
    <?php // load_store_class.inc.php file
    function delete_form($fid)
    {
    if(
    $this->delete_form_choices($fid)) // <-- line 522
    if($this->delete_form_info($fid))
    if(
    $this->delete_form_resp_questions($fid))
    if(
    $this->delete_form_resp_vitals($fid))
    if(
    $this->delete_form_questions($fid))
    return 
    1;
    return 
    0;
    }
    function 
    delete_form_choices($fid)
    { ... }
    ?>
    for some reason, php is telling me i have an undefined function but as you can see, this function is right below it.

    FWIW, delete_form() is a class function getting called from another include file. (LoadStoreData::delete_form($fid) )

  2. #2
    SitePoint Evangelist GeekSupport's Avatar
    Join Date
    May 2002
    Location
    Southern California
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugh! Doesn't look like i can do it that way [img]images/smilies/frown.gif[/img]

    I just tried to create the "undefined function" in the calling class and it worked in there. How would I be able to use the LoadStoreData::delete_form($fid) function that calls other functions within that (loadStore) class?

    [edit]
    Looks like have to do LoadStoreData:: to all of those if statements. pretty funky.


Bookmarks

Posting Permissions

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