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

Inconsistent whitespace trimming for stored "pathtophp" setting

XMLWordPrintable

      I was having issues before trying to run an scheduled task from the UI pressing the "Run now" button because nothing was happening and I was getting no feedback at all.

      After that I realized that I was entering the path to php setting with an empty space at the beginning " /usr/bin/php". The form to add the setting seems to validate if the path is correct but it let's you save the value anyway.

      Then I looked at the code and I saw that in this line it compares $CFG->pathtophp using the trim() method but then it returns the value without using trim(). 

      Because Moodle allows to store the value like this, then the "Run now" button never works.

       

            davidcarrillo David Carrillo
            davidcarrillo David Carrillo
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 52 minutes
                52m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.