Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22006

filter/tex/pix.php should not use error_reporting(E_ALL); or rendering tex fails with php 5.3.X

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.7, 1.9.8
    • 1.9.9
    • Filters
    • None

    Description

      In file filter/tex/pix.php line 29:

      error_reporting(E_ALL);

      corrupts tex images with php 5.3.X and there are at least 3 easy ways to fix it:

      1) To totally remove line 29 and error reporting from that file

      2) To change line 29 to:

      error_reporting(E_ALL & ~E_DEPRECATED);

      so that php 5.3.X does not show the deprecated functions warnings that otherwise would prevent showing of tex images.

      3) To fix the related deprecated functions to make sure that tex filter works also with PHP 6 that will not support deprecated features of php 5.3 at all - like recomended in http://php.net/manual/en/migration53.deprecated.php - in this case the changes mentioned in http://moodle.org/mod/forum/discuss.php?d=146787 might do the job (unless they cause some regression with case PARAM_PATH elsewhere)

      My suggestion is to use 2) and change line 29 of file filter/tex/pix.php

      from

      error_reporting(E_ALL);

      to

      error_reporting(E_ALL & ~E_DEPRECATED);

      for now and make all required changes for php 5.3.X deprecated functions later (after modle 2.0 stable release) to quarantee php 6 support

      Attachments

        Activity

          People

            skodak Petr Skoda
            korpelainen Mauno Korpelainen
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8/Jun/10