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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7, 1.9.8
    • Fix Version/s: 1.9.9
    • Component/s: Filters
    • Labels:
      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

            Assignee:
            skodak Petr Skoda
            Reporter:
            korpelainen Mauno Korpelainen
            Tester:
            Nobody
            Participants:
            Component watchers:
            Jake Dallimore, Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jun/10