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

Checking variables array #73

Closed
turtlepod opened this issue Oct 28, 2024 · 1 comment
Closed

Checking variables array #73

turtlepod opened this issue Oct 28, 2024 · 1 comment

Comments

@turtlepod
Copy link

https://github.com/hrsetyono/wc-ongkir-indonesia/blob/05a40b9050e36bf1c1f1776c7455b9523db8640b/admin/ongkir-zone.php#L97C6-L97C114

$allowed_services = isset($this->main_settings[$setting_id]) ? $this->main_settings[$setting_id] : array();

mesti memastikan $allowed_service array?

$allowed_services = isset($this->main_settings[$setting_id]) && is_array( $this->main_settings[$setting_id] ) ? $this->main_settings[$setting_id] : array();

Atau bisa juga

$allowed_services = isset($this->main_settings[$setting_id]) ? $this->main_settings[$setting_id] : array();
$allowed_services = is_array( $allowed_service ) ? $allowed_service : [];
hrsetyono added a commit that referenced this issue Jan 12, 2025
@hrsetyono
Copy link
Owner

Trims koh, benar harus di cek kalau value nya array

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

No branches or pull requests

2 participants