Skip to content

Commit

Permalink
use foreach instead of the deprecated each construct
Browse files Browse the repository at this point in the history
  • Loading branch information
Colinax committed Dec 1, 2019
1 parent 97897e3 commit acf2f8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wbce/framework/DseTwo.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function getMatchesFromDir($sDirToSearch, $bRetunMode = self::RETURN_USED
if (!$bCacheValid) {
// skip this loop if valid cache is available
$aResultFileList = array();
while (list(, $sFilename) = each($aNewFileList)) {
foreach($aNewFileList as $sFilename){
// iterate all tables and search for filename
if ($this->_getMatch($sDirToSearch . '/' . $sFilename) !== false) {
if ($bRetunMode == self::RETURN_USED) {$aResultFileList[] = $sFilename;}
Expand Down Expand Up @@ -235,7 +235,7 @@ private function _getMatch($sFilename)
$result = 0;
$sFilename = str_replace('_', '\_', $sFilename);
$sSearch = '%' . str_replace('/', '_', $sFilename) . '%';
while (list(, $sQuery) = each($this->_Queries)) {
foreach($this->_Queries as $sQuery){
$sql = sprintf($sQuery, $sSearch);
if (($res = $this->_oDb->query($sql))) {
if (($result = intval($res->fetchRow(MYSQL_ASSOC))) > 0) {break;}
Expand Down
2 changes: 1 addition & 1 deletion wbce/install/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function status_msg($message, $class = 'grey', $element = 'span')
echo '<h4>Missing required tables. You can install them in backend->addons->modules->advanced. Then again run update.php</h4>';
$result = array_diff($table_list, $all_tables);
echo '<h4 class="warning"><br />';
while (list($key, $val) = each($result)) {
foreach($result as $val) {
echo TABLE_PREFIX . $val . ' ' . $FAIL . '<br>';
}
echo '<br /></h4>';
Expand Down

0 comments on commit acf2f8d

Please sign in to comment.