Skip to content

Conversation

@JanTvrdik
Copy link
Contributor

  • bug fix / new feature? minor low-level feature
  • BC break? no
  • doc PR: too low-level to be worth documenting

I need to upload the bluescreen to remote storage (AWS S3 in my case). This is what I'm doing currently

$lockPath = "$localPath.lock";
$lockHandle = @fopen($lockPath, 'x');
if ($lockHandle === false) {
	return;
}

Tracy\Debugger::getBlueScreen()->renderToFile($exception, $localPath);
$this->remoteStorageDriver->upload($localPath);

@fclose($lockHandle);
@unlink($lockPath);

The proposed change would allow to simplify to code to

if (Tracy\Debugger::getBlueScreen()->renderToFile($exception, $localPath)) {
	$this->remoteStorageDriver->upload($localPath);
}

@dg dg merged commit 2cc4339 into nette:master Oct 9, 2018
@JanTvrdik JanTvrdik deleted the patch-2 branch October 9, 2018 19:24
dg pushed a commit that referenced this pull request Oct 24, 2018
dg pushed a commit that referenced this pull request Nov 29, 2018
dg pushed a commit that referenced this pull request Feb 5, 2019
dg pushed a commit that referenced this pull request Feb 5, 2019
dg pushed a commit that referenced this pull request Feb 5, 2019
dg pushed a commit that referenced this pull request Feb 5, 2019
dg pushed a commit that referenced this pull request Feb 10, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 12, 2019
dg pushed a commit that referenced this pull request Feb 14, 2019
dg pushed a commit that referenced this pull request Feb 15, 2019
dg pushed a commit that referenced this pull request Feb 15, 2019
dg pushed a commit that referenced this pull request Feb 15, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
dg pushed a commit that referenced this pull request Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants