Revision 82e22457
Added by Marcos M about 1 year ago
src/etc/rc.carpmaster | ||
---|---|---|
156 | 156 |
|
157 | 157 |
if (is_array($resp) || !empty($resp)) { // $resp will be an array only if the communication was successful |
158 | 158 |
// Contains array of connected users (will be stored in SQLite DB) |
159 |
$connected_users = unserialize(base64_decode($resp['connected_users']));
|
|
159 |
$connected_users = unserialize_data(base64_decode($resp['connected_users']), []);
|
|
160 | 160 |
// Contains array of active vouchers (will be stored in active vouchers db) |
161 |
$active_vouchers = unserialize(base64_decode($resp['active_vouchers']));
|
|
161 |
$active_vouchers = unserialize_data(base64_decode($resp['active_vouchers']), []);
|
|
162 | 162 |
// Contain bitmask of both in use and expired vouchers (will be stored in "used vouchers" db) |
163 |
$expired_vouchers = unserialize(base64_decode($resp['expired_vouchers']));
|
|
163 |
$expired_vouchers = unserialize_data(base64_decode($resp['expired_vouchers']), []);
|
|
164 | 164 |
// Contains array of usedmacs (will be stored in usedmacs db) |
165 |
$usedmacs = unserialize(base64_decode($resp['usedmacs']));
|
|
165 |
$usedmacs = unserialize_data(base64_decode($resp['usedmacs']), []);
|
|
166 | 166 |
|
167 | 167 |
$cpdb = captiveportal_read_db(); |
168 | 168 |
$unsetindexes = array_column($cpdb, 5); |
Also available in: Unified diff
Add a helper function for unserialize(). Fix #15423
For calls to unserialize() which do not check for errors, use the
helper function instead.