Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit e87be4f

Browse files
Brendan CorazzinBrendan Corazzin
authored andcommitted
added check to reursiveSnakeCase method to ensure data was an array prior to entering foreach loop
1 parent b670aad commit e87be4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Module/Acf.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ private function setReturnFilter()
4040
* Return void
4141
*/
4242
private function recursiveSnakeCase(&$data) {
43+
if(!is_array($data))
44+
return;
45+
4346
foreach ($data as $key => $val) {
4447
if (is_array($val)) {
4548
$this->recursiveSnakeCase($val);

0 commit comments

Comments
 (0)