--TEST-- DBA with invalid array key --EXTENSIONS-- dba --SKIPIF-- --FILE-- getMessage(), \PHP_EOL; } try { dba_insert(["a", "b", "c"], "Content String 2", $db); } catch (\Error $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } /* Use an object */ $o = new stdClass(); try { var_dump(dba_insert([$o, 'obj'], 'Test', $db)); } catch (\Error $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } try { var_dump(dba_insert(['group', $o], 'Test', $db)); } catch (\Error $e) { echo $e::class, ': ', $e->getMessage(), \PHP_EOL; } dba_close($db); ?> --CLEAN-- --EXPECTF-- Using handler: "%s" Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" Error: Object of class stdClass could not be converted to string Error: Object of class stdClass could not be converted to string