Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9975

Hard coded language in sessions.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.12-RC1
    • Component/s: Other
    • Labels:
    • Environment:
      All

      Description

      trigger_error('Could not get style data', E_USER_ERROR); should be lang var?

        Activity

        Hide
        igorw Igor Wiedler [X] (Inactive) added a comment - - edited

        Changing it to a language var would probably be possible. But this should really never happen anyway. If somebody wants to submit a (working) pull request, I'd be glad to merge it.

        If nobody steps up, I will close it, since it's really no priority to fix such things.

        Show
        igorw Igor Wiedler [X] (Inactive) added a comment - - edited Changing it to a language var would probably be possible. But this should really never happen anyway. If somebody wants to submit a (working) pull request, I'd be glad to merge it. If nobody steps up, I will close it, since it's really no priority to fix such things.
        Hide
        michaelo Michael O'Toole added a comment -

        The error is especially common on site that develop styles where there is constant updating of styles... In addition, bot appear to add style=x when indexing a site, resulting in a substantial amount of error reports...

        Apart from the actual report and the possibility of screwing up bot indexing why does the code not simply replace the style=x with the default style id... That's what we had to do to stop the errors...
        if (!$this->theme)

        { // Report missing style and redirect to default style... (stop bots generating countless errors) add_log('critical', 'STYLE_MISSING', request_var('style', 0), $user->data['user_id']); redirect(build_url('style') .'?style='. $config['default_style']); //original code//trigger_error('Could not get style data', E_USER_ERROR); }
        Show
        michaelo Michael O'Toole added a comment - The error is especially common on site that develop styles where there is constant updating of styles... In addition, bot appear to add style=x when indexing a site, resulting in a substantial amount of error reports... Apart from the actual report and the possibility of screwing up bot indexing why does the code not simply replace the style=x with the default style id... That's what we had to do to stop the errors... if (!$this->theme) { // Report missing style and redirect to default style... (stop bots generating countless errors) add_log('critical', 'STYLE_MISSING', request_var('style', 0), $user->data['user_id']); redirect(build_url('style') .'?style='. $config['default_style']); //original code//trigger_error('Could not get style data', E_USER_ERROR); }
        Hide
        igorw Igor Wiedler [X] (Inactive) added a comment -

        Not a priority, if anyone wants to supply a patch, go ahead.

        Show
        igorw Igor Wiedler [X] (Inactive) added a comment - Not a priority, if anyone wants to supply a patch, go ahead.
        Hide
        asperous asperous [X] (Inactive) added a comment - - edited

        I went ahead and changed this and a few others in #1365

        Show
        asperous asperous [X] (Inactive) added a comment - - edited I went ahead and changed this and a few others in #1365
        Hide
        naderman Nils Adermann added a comment -

        Merged both PRs

        Show
        naderman Nils Adermann added a comment - Merged both PRs

          People

          • Assignee:
            naderman Nils Adermann
            Reporter:
            michaelo Michael O'Toole
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development