Zend Framework 1 bug: «The locale '' is no known locale»

This bug can be reproduced manually with Zend Framework by the following code:

\Zend_Locale::findLocale('non existent')

The bug also can be reproduced in some live Zend Framework based websites, e.g.:

This website is not mine and is not Magento based, I have found it with Google by the «The locale ‘’ is no known locale» query.

Magento 1 and Magento 2 both use Zend Framework 1, so they also vulnerable to this failure.

In my experience, the failure is often encountered in Norwegian websites: may be some Norwegian visitors have some specific locale settings (in a browser on in an operating system), and these settings are wrongly handled by Zend Framework (are absent in the Zend Framework locales dictionary).

The problem method is \Zend_Locale::findLocale: