Skip to content

Instantly share code, notes, and snippets.

@marc1706
marc1706 / Readme.md
Last active March 27, 2016 13:13
Instructions on setting up environment for acp design
PHPUnit 3.7.27 by Sebastian Bergmann.
Configuration read from /home/marc/Dokumente/Entwicklung/phpbb3/phpunit.xml.dist
............................................................. 61 / 2210 ( 2%)
......................I.....SSSS.......SSSS.................. 122 / 2210 ( 5%)
............................................................. 183 / 2210 ( 8%)
............................................................. 244 / 2210 ( 11%)
............................................................. 305 / 2210 ( 13%)
............................................................. 366 / 2210 ( 16%)
<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd>
<duplication lines="8" tokens="36">
<file path="/home/marc/Dokumente/Entwicklung/phpbb3/phpBB/phpbb/session.php" line="373"/>
<file path="/home/marc/Dokumente/Entwicklung/phpbb3/phpBB/phpbb/session.php" line="692"/>
<codefragment> if (strpos($this-&gt;ip, ':') !== false &amp;&amp; strpos($this-&gt;data['session_ip'], ':') !== false)
{
$s_ip = short_ipv6($this-&gt;data['session_ip'], $config['ip_check']);
$u_ip = short_ipv6($this-&gt;ip, $config['ip_check']);
}
@marc1706
marc1706 / gist:6838325
Created October 5, 2013 08:29
Run phpcpd on all PHP files and output into xml report file in parent folder.
wget https://phar.phpunit.de/phpcpd.phar
find -name *.php | xargs php phpcpd.phar --log-pmd ../report_name.xml
marc@marc-G71GX ~/Dokumente/Entwicklung/phpbb3 $ sudo phpunit -c phpunit.xml.functional "tests/functional/report_post_captcha.php"
PHPUnit 3.7.22 by Sebastian Bergmann.
Configuration read from /home/marc/Dokumente/Entwicklung/phpbb3/phpunit.xml.functional
F.
Time: 14 seconds, Memory: 11.25Mb
There was 1 failure:
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index a134fab..09f02b1 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1173,6 +1173,20 @@ class parse_message extends bbcode_firstpass
}
}
+ // Check for out-of-bounds characters that are currently
+ // not supported by utf8_bin
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.0.16-marc1706+ (root@marc-G71GX) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-188) ) #56 PREEMPT Sat Jun 29 16:41:20 CEST 2013
[ 0.000000] CPU: ARMv7 Processor [510f00f2] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: VIPT nonaliasing data cache, VIVT ASID tagged instruction cache
[ 0.000000] Machine: htcleo
[ 0.000000] Nand Boot: 2
[ 0.000000] Partition (from atag) lk -- Offset:212 Size:3
[ 0.000000] Partition (from atag) recovery -- Offset:216 Size:30
[ 0.000000] Partition (from atag) boot -- Offset:246 Size:28
[ 0.000000] Partition (from atag) misc -- Offset:26e Size:8
target thumb C++: gralloc.qsd8k <= hardware/qcom/display-legacy/libgralloc/gpu.cpp
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp: In function 'int getPmemTotalSize(int, size_t*)':
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:51:19: error: expected primary-expression before 'unsigned'
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:51:19: error: '_IOW' was not declared in this scope
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp: In function 'int connectPmem(int, int)':
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:68:19: error: expected primary-expression before 'unsigned'
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:68:19: error: '_IOW' was not declared in this scope
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp: In function 'int mapSubRegion(int, int, size_t)':
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:75:19: error: expected primary-expression before 'unsigned'
hardware/qcom/display-legacy/libgralloc/pmemalloc.cpp:75:19: error: '_IOW' was no
Process 3105 attached with 86 threads - interrupt to quit
[pid 4180] clock_gettime(CLOCK_MONOTONIC, {658, 844110540}) = 0 <0.000061>
[pid 4180] epoll_wait(0xf6, 0x590cab18, 0x10, 0xffffffff <unfinished ...>
[pid 4179] futex(0x523fdd98, FUTEX_WAIT_PRIVATE, -112, NULL <unfinished ...>
[pid 4164] futex(0x515c4fcc, FUTEX_WAIT_PRIVATE, -2, NULL <unfinished ...>
[pid 4159] restart_syscall(<... resuming interrupted call ...> <unfinished ...>
[pid 4151] ioctl(10, 0xc0186201 <unfinished ...>
[pid 4131] futex(0x5126279c, FUTEX_WAIT_PRIVATE, -2, NULL <unfinished ...>
[pid 4104] ioctl(10, 0xc0186201 <unfinished ...>
[pid 3538] select(1, [], NULL, NULL, {0, 719055} <unfinished ...>
$tmp = trim(preg_replace('#((\d+)\.)+(\d+)[a-z]?#', '', $version));
if (!empty($tmp))
{
// Woohoo, user is nub, something more as a number
$this->push_error(mpv::ERROR_FAIL, 'VERSION_SHOULD_BE_VERSION', array($version, $version));
return false;
}