Code Duplication    Length = 5-5 lines in 2 locations

phpsysinfo/includes/class.CommonFunctions.inc.php 2 locations

@@ 123-127 (lines=5) @@
120
        }
121
        foreach ($arrPath as $strPath) {
122
            // Path with trailing slash
123
            if (PSI_OS == 'WINNT') {
124
                $strPathS = rtrim($strPath, "\\")."\\";
125
            } else {
126
                $strPathS = rtrim($strPath, "/")."/";
127
            }
128
            // To avoid "open_basedir restriction in effect" error when testing paths if restriction is enabled
129
            if (isset($open_basedir)) {
130
                $inBaseDir = false;
@@ 163-167 (lines=5) @@
160
            if (($strPath !== $exceptPath) && !is_dir($strPath)) {
161
                continue;
162
            }
163
            if (PSI_OS == 'WINNT') {
164
                $strProgrammpath = rtrim($strPath, "\\")."\\".$strProgram;
165
            } else {
166
                $strProgrammpath = rtrim($strPath, "/")."/".$strProgram;
167
            }
168
            if (is_executable($strProgrammpath)) {
169
                return $strProgrammpath;
170
            }