I
imported_erickman
Curioso
Usuário com poucas negociações! Use sempre o saldo do ForoBeta!
tengo un problema con una funcion es de un modulo de WHMCS
aqui les muestro el error espero que me ayuden
if (!()->hasTable('mod_xtreamautoscript')) { <-------ERROR AQUI syntax error, unexpected '}'
WHMCS\Database\Capsule::schema()->create('mod_xtreamautoscript', function($table) {
$table->string('name');
$table->string('value');
});
$autoscript = array('Enigma 2 OE 1.6' => 'wget -O /etc/enigma2/iptv.sh \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=enigma216_script&output={$outputfirst}\' && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh', 'Enigma 2 OE 2.0' => 'wget -O /etc/enigma2/iptv.sh \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=enigma22_script&output={$outputfirst}\' && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh', 'Octagon Script' => 'wget -qO /var/bin/iptv \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=octagon_script&output={$outputfirst}\'');
foreach ($autoscript as $name => $value) {
$configurationautoscript[] = array('name' => $name, 'value' => $value);
}
WHMCS\Database\Capsule::table('mod_xtreamautoscript')->delete();
try {
WHMCS\Database\Capsule::table('mod_xtreamautoscript')->insert($configurationautoscript);
}
catch (Exception $e) {
return array('status' => 'error', 'description' => $e->getMessage() . '. There is an error while activating this module');
}
}
else { <----- ERROR AQUI
return array('status' => 'error', 'description' => $e->getMessage() . '. There is an error while activating this module');
}
aqui les muestro el error espero que me ayuden
if (!()->hasTable('mod_xtreamautoscript')) { <-------ERROR AQUI syntax error, unexpected '}'
WHMCS\Database\Capsule::schema()->create('mod_xtreamautoscript', function($table) {
$table->string('name');
$table->string('value');
});
$autoscript = array('Enigma 2 OE 1.6' => 'wget -O /etc/enigma2/iptv.sh \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=enigma216_script&output={$outputfirst}\' && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh', 'Enigma 2 OE 2.0' => 'wget -O /etc/enigma2/iptv.sh \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=enigma22_script&output={$outputfirst}\' && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh', 'Octagon Script' => 'wget -qO /var/bin/iptv \'{$serverhostname}/get.php?username={$iptv_username}&password={$iptv_password}&type=octagon_script&output={$outputfirst}\'');
foreach ($autoscript as $name => $value) {
$configurationautoscript[] = array('name' => $name, 'value' => $value);
}
WHMCS\Database\Capsule::table('mod_xtreamautoscript')->delete();
try {
WHMCS\Database\Capsule::table('mod_xtreamautoscript')->insert($configurationautoscript);
}
catch (Exception $e) {
return array('status' => 'error', 'description' => $e->getMessage() . '. There is an error while activating this module');
}
}
else { <----- ERROR AQUI
return array('status' => 'error', 'description' => $e->getMessage() . '. There is an error while activating this module');
}