Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Fix logged error if file ID is not available #288

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

MorrisJobke
Copy link
Member

fixes errors like this:

"url":"/apps/gallery/preview/426429?width=3400&height=3400&c=594c37c83d999&requesttoken=VY8nKK5eeu3W6uVKtFvD+YSnXVfoXdas+mQvmFgXZGU=:YsZFTOgXCoOk3td/wQiVivTKFTOpC5fKmSNswDRQNFE=",
"message":"Undefined offset: 0 at /var/www/nextcloud/apps/gallery/lib/Environment/Environment.php#360",

and

"url":"/apps/gallery/preview/426429?width=3400&height=3400&c=594c37c83d999&requesttoken=VY8nKK5eeu3W6uVKtFvD+YSnXVfoXdas+mQvmFgXZGU=:YsZFTOgXCoOk3td/wQiVivTKFTOpC5fKmSNswDRQNFE=",
"message":"ExceptionCould not locate node linked to ID: 426429",

to only log the last error and not both.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke MorrisJobke added 3. to review Waiting for reviews backport-request Pending backport by the backport-bot labels Jun 22, 2017
@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Jun 22, 2017
@MorrisJobke
Copy link
Member Author

See https://3v4l.org/0cXQA for behaviour. no matter if the element is there or not it will evaluate to true then.

@codecov
Copy link

codecov bot commented Jun 22, 2017

Codecov Report

Merging #288 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #288   +/-   ##
=========================================
  Coverage     81.93%   81.93%           
  Complexity      334      334           
=========================================
  Files            38       38           
  Lines          1284     1284           
=========================================
  Hits           1052     1052           
  Misses          232      232
Impacted Files Coverage Δ Complexity Δ
lib/Environment/Environment.php 95.55% <100%> (ø) 28 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28a5c9b...45b3b72. Read the comment docs.

@MorrisJobke MorrisJobke merged commit 471b159 into master Jun 22, 2017
@MorrisJobke MorrisJobke deleted the gix-if-file-id-not-available branch June 22, 2017 22:08
@MorrisJobke MorrisJobke removed the backport-request Pending backport by the backport-bot label Jun 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants