ezyang / ezyang/htmlpurifier

Deleting a file that does not exist on the server

Open
#442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
361
Avg merge
3d 41m
Merged PRs (30d)
2

Description

For some reason I have to use multiple versions of this library.
I sometimes get the following error.

exception : 
"ErrorException" file :  "/var/www/html/server/niyam/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php"
line :  143
message :  "unlink( .../storage/app/purifier/HTML/4.17.0,19f8feec63cd8ce29ac2494f39592aed6bd4c4fa,1.ser): No such file or directory"

The problem occurs when the file is not on the server and the code wants to delete it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at library/HTMLPurifier/DefinitionCache/Serializer.php around line 143, where the missing cache file is deleted. Reproduce the case with a target file absent from the server and inspect the resulting behavior. Done means deleting a nonexistent file no longer raises the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.