Skip to content

Instantly share code, notes, and snippets.

View co3k's full-sized avatar
🔞
"><s>'\

Kousuke Ebihara co3k

🔞
"><s>'\
View GitHub Profile
diff --git a/lib/user/opSecurityUser.class.php b/lib/user/opSecurityUser.class.php
index 60e6e45..679a889 100644
--- a/lib/user/opSecurityUser.class.php
+++ b/lib/user/opSecurityUser.class.php
@@ -18,6 +18,8 @@
*/
class opSecurityUser extends opAdaptableUser
{
+ protected $serializedMember = null;
+
@co3k
co3k / indirectmod.php
Created April 17, 2010 04:31
Indirect modification of overloaded property ... を再現させるコード
<?php
class ebisan
{
public $kani = array();
public function __get($name)
{
return $this->kani[$name];
}
<?php
$url = 'http://co3k.test.s3.amazonaws.com/opAloePlugin-1.0.0.tgz';
$gp = gzopen($url, 'rb');
$fp = fopen($argv[1], 'wb');
stream_copy_to_stream($gp, $fp);
fclose($fp);
$binary = file_get_contents($argv[1]);
<?php
$input = "it\0contains\0null";
file_put_contents('/tmp/01', $input);
$output = file_get_contents('/tmp/01');
var_dump($output === $input, $output);
/*
期待する結果: bool(true) string(16) "itcontainsnull"
<?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
LANG = en
diff --git a/config/doctrine/schema.yml b/config/doctrine/schema.yml
index 388662d..ad12d25 100644
--- a/config/doctrine/schema.yml
+++ b/config/doctrine/schema.yml
@@ -3,6 +3,9 @@ options:
actAs: [Timestampable]
CommunityTopic:
+ actAs:
+ opCommunityTopicPluginImagesBehavior:
<?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
diff --git a/lib/vendor/PEAR/PEAR/Common.php b/lib/vendor/PEAR/PEAR/Common.php
index 5276441..1e0a7db 100644
--- a/lib/vendor/PEAR/PEAR/Common.php
+++ b/lib/vendor/PEAR/PEAR/Common.php
@@ -30,7 +30,7 @@ define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+');
define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/');
// this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1
-define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?');
+define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z\d]+)?');