Undefined offset (show.php?records=all)

Help
micercle
2007-10-17
2013-05-28
  • micercle

    micercle - 2007-10-17

    With the script show.php?records=all I get the message

    " Notice: Undefined offset: 1 in
    /usr/local/www/data-dist/refbase/includes/include.inc.php on line
    1878 "

    This problem is arised today, after adding a new record. The last (with or without file upload) were made a few days ago and might be listed without warning.

    If I understand, the problem is about the extraction  of authors name ? No? Is it a question of separator between the different author names.

    (Refbase 0.9.0 run on FreeBSD 5.5, with php5-5.2.3, mysql 4.1.22)

    Thanks for yours hints and help

    Micercle

     
    • Matthias Steffens

      Hi Micercle,

      the problem you're seeing has been already fixed and will be available in the next release. You can also fix it yourself. To do so, open file 'includes/include.inc.php' and goto function 'extractAuthorsGivenName()'. Within that function, replace the line:

         $singleAuthorsGivenName = $singleAuthorArray[1]; // extract this author's last name into a new variable

      with this piece of code:

         if (!empty($singleAuthorArray[1]))
            $singleAuthorsGivenName = $singleAuthorArray[1]; // extract this author's last name into a new variable
         else
            $singleAuthorsGivenName = '';

      This should avoid the error message.

      > If I understand, the problem is about the extraction of authors name ?

      Yes, that's correct.

      > Is it a question of separator between the different author names.

      The problem regards the extraction of the individual name parts for a given author. Without the above fix, the error occurs when an author name is not separated into family name and initials by a comma character.

      Matthias

       
    • micercle

      micercle - 2007-10-18

      Thanks, Refbase works perfectly now ! It's a very useful and user friendly tool !
      Thanks for your help Matthias

      Micercle

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks