Re-open: Notice thrown by White Label extension

Hi,
I had made a post earlier about this issue but didn’t have time to respond yet, hence it was auto-closed in the meanwhile.
Link to previous post: Notice thrown by White Label extension

Unfortunately the response is unsatisfactory and incorrect.

This is a waring message:
Warning: getimagesize(https://staging.kerteza.com/wp-content/uploads/2019/04/Kerteza-logo-small-web-RGB_250px.png)

which means that the image does not exist. You are also seeing this warning because your debug mode is enabled. Can you please disable your debug mode instead? You can do this by opening wp-config.php and adding

define(‘WP_DEBUG’, false);

The image of course does exist, because it is actually shown, it simply isn’t resized because the size can not be determined.
The reason this warning is thrown and the size can not be determined by getimagesize() is because the site is protected with basic authentication.

Of course the getimagesize() function is not made to pass along basic authentication headers in it’s request, this would also render the use of basic authentication virtually obsolete since one would have to make the basic auth credentials available from within the code.

We use the plugin on our staging servers, these are used so our customers can test new functionality and that is also why it needs to be secured with basic authentication since they aren’t production sites.

The suggestion to simply turn off WP_DEBUG is not a solution because the image still wouldn’t get resized but most importantly it would also hide any notices, warnings etc for our developers and customers.

We strive to have none of our code trigger notices or warnings because to us that is simply good practice and that way we avoid having to refactor code later on when newer PHP versions escalate notices to warnings, warnings to errors etc.

To be honest I am flabbergasted by the response because it not only doesn’t solve the issue, it would merely hide the cause of the issue AND I actually provided a code snippet that would fix the issue including the file and line number where the fix is needed.

It would be very silly if we have to fork the plugin in a private repo and fix it ourselves.
I sincerely hope this is not the only level of support we can get…

Kind regards.

Hey Matth,

We’re sorry for the wrong answer.

Regarding notices, we do strive to eliminate them also and the case should have been posted to our issue tracker so it will be queued for investigation by our development team.

Usually though, while we report issues, we recommend turning off debugging for live sites. I believe my colleague missed that you’re using a staging site.

I’ll post the issue in our tracker now.

We’re sorry for the inconvenience.

Hi Christian,

Thank you for the quick reply and moving the issue into your tracker.
Much appreciated!

Kind regards

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.