mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-12 01:50:48 +01:00
fix undefined index in cloak_mask/uncloak_mask
This commit is contained in:
parent
8decd4f73f
commit
281dccb690
@ -3027,7 +3027,7 @@ function uncloak_ip($ip) {
|
||||
}
|
||||
|
||||
function cloak_mask($mask) {
|
||||
list($net, $block) = explode('/', $mask, 2);
|
||||
list($net, $block) = array_pad(explode('/', $mask, 2), 2, null);
|
||||
$mask = cloak_ip($net);
|
||||
if ($block) {
|
||||
$mask .= '/'.$block;
|
||||
@ -3037,7 +3037,7 @@ function cloak_mask($mask) {
|
||||
}
|
||||
|
||||
function uncloak_mask($mask) {
|
||||
list($addr, $block) = explode('/', $mask, 2);
|
||||
list($addr, $block) = array_pad(explode('/', $mask, 2), 2, null);
|
||||
$mask = uncloak_ip($addr);
|
||||
if ($mask === '#ERROR') {
|
||||
$mask = $addr;
|
||||
|
Loading…
Reference in New Issue
Block a user