Solve some notices that were breaking Excel generation under

some PHP versions. As bug is well documented but PEAR code hasn't
been changed in origin, we'll patch it here. Changes will
merge smoothly in the future, I think.
(Moode Bug: http://moodle.org/bugs/bug.php?op=show&bugid=4763)
(PEAR Bug: http://pear.php.net/bugs/bug.php?id=6509)
This commit is contained in:
stronk7 2006-04-11 22:49:09 +00:00
parent 89a6e4358a
commit 766ad62808
2 changed files with 7 additions and 7 deletions

View file

@ -219,7 +219,7 @@ class MoodleExcelWorksheet {
* @return mixed PEAR Excel Format object
*/
function MoodleExcelFormat2PearExcelFormat($format) {
if ($format != 0) {
if (is_object($format)) {
return $format->pear_excel_format;
} else {
return 0;