Skip to content

Instantly share code, notes, and snippets.

View slusarz's full-sized avatar

Michael M Slusarz slusarz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am slusarz on github.
  • I am slusarz (https://keybase.io/slusarz) on keybase.
  • I have a public key whose fingerprint is C4F5 48D7 8E72 730D 01AD 732C 9A54 9195 9060 8111

To claim this, I am signing this object:

@slusarz
slusarz / Autoconfigure.php
Created August 4, 2014 20:23
Translation Autoconfiguration
class Horde_Translation_Autoconfigure extends Horde_Translation
{
/**
*/
static public function loadHandler($handlerClass)
{
if (!isset(self::$_directory)) {
$a = new ReflectionClass(get_called_class());
$dir = dirname($a->getFilename());
$subdir = substr_count(self::$_domain, '_');
@slusarz
slusarz / test.php
Created February 4, 2013 20:48
Test script: serialize incorrectly saving objects when they are cloned
<?php
class A
{
public $a = array();
public function __construct()
{
$this->a[] = new B(1);
$this->a[] = new B(2);