Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning array to string conversion in oik_box when $id null and $callback is a method #141

Open
bobbingwide opened this issue Jan 23, 2020 · 0 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

While developing an improvement to oik-clone I coded the following calls to oik_box().

oik_box( null, null, "Slave", [ $this, 'oik_clone_slave_form' ] );

I got a warning message because of this code.

if ( $id == null ) {
			$id = $callback;
		}  

The code should allow for the $callback parameter being an array representing a method in a class.

Workaround

Pass a unique value for the $id parameter, rather than null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant