Postingan lainnya
Error script di update php 7.3.2
Sebelumnya saya di php 7.1 setelah update ke versi 7.3.2 error di project tiba2 muncul
Message: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
tepatnya di plugin-plugin yg ada switch-case condition
foreach ($options as $k => $v) {
switch ($k) {
// Boolean keys
case 'HideToolbar':
case 'HideMenubar':
case 'HideWindowUI':
case 'FitWindow':
case 'CenterWindow':
case 'DisplayDocTitle':
case 'PickTrayByPDFSize':
$o['info'][$k] = (bool)$v;
break;
// Integer keys
case 'NumCopies':
$o['info'][$k] = (int)$v;
break;
// Name keys
case 'ViewArea':
case 'ViewClip':
case 'PrintClip':
case 'PrintArea':
$o['info'][$k] = (string)$v;
break;
// Named with limited valid values
case 'NonFullScreenPageMode':
if (!in_array($v, array('UseNone', 'UseOutlines', 'UseThumbs', 'UseOC'))) {
continue;
}
$o['info'][$k] = $v;
break;
case 'Direction':
if (!in_array($v, array('L2R', 'R2L'))) {
continue;
}
$o['info'][$k] = $v;
break;
setiap syntax line continue error
0
1 Jawaban:
Continue di dalam loop, bisa bikin loopnya berhenti, cek <a href=' http://php.net/manual/en/control-structures.switch.php'>dokumentasi switch di php</a> gunakaan "continue 2" kalau switch di dalam loop
*Kalau kamu pakai plugin, saya sarankan bikin "issue" di github orangnya, biar bisa diperbaiki secara menyeluruh yang tidak compatible.
0