Server IP : 184.154.167.98 / Your IP : 3.147.63.222 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/mesa/setup/test/tests/ |
Upload File : |
<?php require_once "class.test.php"; class UndefinedMethods extends Test { var $name = "Access to undefined object methods"; static function ignore3rdparty() { return false; } function testUndefinedMethods() { $scripts = static::getAllScripts(); $function_defs = array(); foreach ($scripts as $s) { $matches = array(); preg_match_all('/^\s*(?:\/\*[^*]*\*\/)?\s*' .'(?:(?:private|public|protected|static|abstract)\s+)*' .'function\s+&?\s*([^(\s]+)\s*\(/m', file_get_contents($s), $matches); $function_defs = array_merge($function_defs, $matches[1]); } foreach (static::find_function_calls($scripts) as $call) { list($file, $no, $line, $func) = $call; if (!in_array($func, $function_defs)) { // We don't ship all of mdpf, so a bit of it looks undefined if (strpos($file, '/mpdf/') === false) $this->fail($file, $no, "$func: Definitely undefined"); } else { $this->pass(); } } } } return 'UndefinedMethods'; ?>