Code Duplication    Length = 3-5 lines in 2 locations

htdocs/install/class/pathcontroller.php 1 location

@@ 69-71 (lines=3) @@
66
            }
67
        } else {
68
            $path = str_replace("\\", '/', realpath('../'));
69
            if (substr($path, -1) === '/') {
70
                $path = substr($path, 0, -1);
71
            }
72
            if (file_exists("$path/mainfile.dist.php")) {
73
                $this->xoopsPath['root'] = $path;
74
            }

htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/DOMLex.php 1 location

@@ 193-197 (lines=5) @@
190
                $new_data = trim($data);
191
                if (substr($new_data, 0, 4) === '<!--') {
192
                    $data = substr($new_data, 4);
193
                    if (substr($data, -3) === '-->') {
194
                        $data = substr($data, 0, -3);
195
                    } else {
196
                        // Highly suspicious! Not sure what to do...
197
                    }
198
                }
199
            }
200
            $tokens[] = $this->factory->createText($this->parseText($data, $config));