Skip to content

Commit ed381dd

Browse files
author
Jacob Middag
committed
Fix Fopen error in output_options
1 parent 7c1a7b2 commit ed381dd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/class-tiny-compress-fopen.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ protected function shrink($input) {
5151

5252
if (!$request) {
5353
$headers = self::parse_headers($http_response_header);
54+
5455
return array(array(
5556
'error' => 'FopenError',
5657
'message' => 'Could not compress, enable cURL for detailed error',
@@ -83,11 +84,11 @@ protected function output_options($resize) {
8384
);
8485
$options['http']['content'] = json_encode(array('resize' => $resize));
8586
}
87+
return $options;
8688
}
8789

8890
protected function output($url, $resize) {
89-
$options = $this->output_options($resize);
90-
$context = stream_context_create($options);
91+
$context = stream_context_create($this->output_options($resize));
9192
$request = @fopen($url, 'rb', false, $context);
9293

9394
if ($request) {

0 commit comments

Comments
 (0)