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

    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

        Gliffy Diagrams

          Activity

          korpelainen Mauno Korpelainen created issue -
          skodak Petr Skoda made changes -
          Field Original Value New Value
          Assignee Eloy Lafuente (stronk7) [ stronk7 ] Petr Škoda (skodak) [ skodak ]
          skodak Petr Skoda made changes -
          Fix Version/s 1.9.9 [ 10405 ]
          skodak Petr Skoda made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          dougiamas Martin Dougiamas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          QA Assignee nobody
          dougiamas Martin Dougiamas made changes -
          Workflow jira [ 35730 ] MDL Workflow [ 64074 ]
          dougiamas Martin Dougiamas made changes -
          Workflow MDL Workflow [ 64074 ] MDL Full Workflow [ 93335 ]

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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