Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with https images #23

Open
quentinchauveau opened this issue Aug 2, 2017 · 0 comments
Open

Problem with https images #23

quentinchauveau opened this issue Aug 2, 2017 · 0 comments

Comments

@quentinchauveau
Copy link

Hi,

I am working with zend 2 and WebinoImageThumb, and i realize there is a bug with https image.
If i put an https image, i get a "Image file not found:" error from this code:

protected function fileExistsAndReadable ()
{
		if ($this->isDataStream === true)
		{
			return;
		}

		if (stristr($this->fileName, 'http://') !== false)
		{
			$this->remoteImage = true;
			return;
		}

		if (!file_exists($this->fileName))
		{
			$this->triggerError('Image file not found: ' . $this->fileName);
		}
		elseif (!is_readable($this->fileName))
		{
			$this->triggerError('Image file not readable: ' . $this->fileName);
		}
}

So i changed it:

if (stristr($this->fileName, 'http://') !== false || stristr($this->fileName, 'https://') !== false)
{
	$this->remoteImage = true;
	return;
}

I wonder if there is any reason that https wasn't considered here?

Thanks.

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

No branches or pull requests

1 participant