Error when viewing journals

Error when viewing journals

by Rudy Scott -
Number of replies: 3

I recently set up a new testbed becuase I wanted to start playing with moodle development.  I updated the latest code from the CVS and got this error when trying to view a newly added journal entry.  Anyone else run into this?

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /var/www/localhost/htdocs/dev/moodle/mod/journal/view.php on line 48

It appears to me that the following change needs to be made, since empty() only checks variables.

  $tempintro = trim($journal->intro);
  if (!empty($tempintro))
//   if (!empty(trim($journal->intro))) {
  {
        print_simple_box( format_text($journal->intro,  $journal->introformat) , "center");
    }

--Rudy

Average of ratings: -
In reply to Rudy Scott

Re: Error when viewing journals

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Rudy,

done (yesterday) in CVS !! Telepathy, perhaps big grin

Thanks and ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Error when viewing journals

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yes, I fixed that after I too discovered empty() only checks variables. blush

Anonymous CVS can take a little while to catch up to developer CVS.

Thanks for posting the corresponding fix anyway, those are my favourite kind of reports.  approve
In reply to Martin Dougiamas

Re: Error when viewing journals

by Rudy Scott -

Sounds like I was just a little too slow smile -- glad to here it's been resolved. 

--Rudy