(bug 36908) Language::isValidBuiltInCode passed an object
authorAntoine Musso <hashar@free.fr>
Wed, 16 May 2012 14:56:22 +0000 (16:56 +0200)
committerAntoine Musso <hashar@free.fr>
Fri, 18 May 2012 06:40:17 +0000 (08:40 +0200)
commit120a3f2b60c164090c8b00a610a5cfcb60fa1569
tree59184ed7b136faab429414c5f93244c167c4397d
parent5ec99f4b24f7ce2bd4028d62c88d6adf44bda3f9
(bug 36908) Language::isValidBuiltInCode passed an object

This make isValidBuiltInCode to throw an exception whenever it is passed
something which is not a string.  The rational being to easily find out
errors when the method is wrongly used.

An alternative would be to detect the object being passed is a Language
object and get its Language code.

Change-Id: I37cc419cc725df8d8022e619d8f5191f58a8fd5e
languages/Language.php