Update Hash.php

I'm not sure on whether this is a problem with my local app but I have seen it a couple of times in a couple of projects: 
Warning (2): Invalid argument supplied for foreach() [CORE/Cake/Utility/Hash.php, line 52]

I think Hash::get should be able to handle this better rather than throwing an error in a core Util file.
Yeah it is - ill update this for that aswell


On 23 June 2014 21:23, Daniel Voyce <voycey@gmail.com> wrote:

> Is localisation done across other exceptions?
>
>
> On 23 June 2014 21:16, ndm2 <notifications@github.com> wrote:
>
>> In lib/Cake/Utility/Hash.php:
>>
>> > @@ -50,6 +51,11 @@ public static function get(array $data, $path, $default = null) {
>> >  		} else {
>> >  			$parts = $path;
>> >  		}
>> > +		
>> > + 		if (!is_array($parts)) {
>> > +            		throw new InvalidArgumentException(sprintf("Invalid Parameter %s, should be dot separated path or array", $path));
>>
>> I think this should be localizable.
>>
>> _d('cake_dev', 'Invalid Parameter %s, should be dot separated path or array', $path);
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/cakephp/cakephp/pull/3754/files#r14070180>.
>>
>
>
>
> --
> __
> Mob: (+61) 0481 301 640
> Skype: daniel.voyce
> Twitter: www.twitter.com/voycey
>



-- 
__
Mob: (+61) 0481 301 640
Skype: daniel.voyce
Twitter: www.twitter.com/voycey