mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
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:
parent
89a6e4358a
commit
766ad62808
2 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue