Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20885

Suppress error when attempting to create fake file

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.22
    • Fix Version/s: 4.7.24
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Various checks in CRM/Utils/Check attempt to create files in some CiviCRM directories. In cases where those directories are not writable, the attempt to create a file to retrieve over HTTP fails and generates a warning, which can be alarming to the user.

      > Warning: file_put_contents(/srv/www/example/example.org/sites/all/civicrm/extensions/delete-this-NcGAF81tky): failed to open stream: Permission denied in CRM_Utils_File::createFakeFile() (line 306 of /srv/www/example/example.org/sites/all/modules/civicrm/CRM/Utils/File.php).

      Most of those checks already use error-suppression on the attempt to retrieve the generated file, and based on the method name and usage I think we should also suppress error if the file is unable to be created.

      See also CRM-20809 (which may have changed the directory some of these checks attempt to write to).

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: