Skip to content

Instantly share code, notes, and snippets.

<?php
class A {
private $property = "This text should be ALLWAYS accessible\n";
public function doSomething(A $instance) {
if($instance === $this) {
echo $this->property;
[2013-07-08 11-05-25] PHP Warning: Attempt to assign property of non-object in [path_hidden]/libs/Nette/Config/Configurator.php:48 [url_hidden]
[2013-07-08 11-05-25] Nette\InvalidStateException: Callback '' is not callable. in [path_hidden]/libs/Nette/common/Callback.php:90 [url_hidden]
[2013-07-08 11-05-25] PHP Warning: Attempt to assign property of non-object in [path_hidden]/libs/Nette/Utils/Html.php:97 [url_hidden]
[2013-07-08 11-05-25] PHP Warning: Attempt to assign property of non-object in [path_hidden]/libs/Nette/Utils/Html.php:98 [url_hidden]
[2013-07-08 11-05-25] PHP Warning: Attempt to assign property of non-object in [path_hidden]/libs/Nette/Utils/Html.php:440 [url_hidden]
[2013-07-08 11-07-14] PHP Warning: Attempt to assign property of non-object in [path_hidden]/libs/Nette/Config/Configurator.php:48 [url_hidden]
[2013-07-08 11-07-14] PHP Notice: Undefined index: environment in [path_hidden]/libs/Nette/Config/Configurator.php:162 [url_hidden]
[2013-07-08 11-07-14] PHP Notice: Undefined ind
@ZZromanZZ
ZZromanZZ / curl get ftpAuth file
Created July 23, 2013 18:38
curl get ftpAuth file
<?php
function saveFtpFile( $targetFile = null, $sourceFile = null, $ftpuser = null, $ftppassword = null ){
// function settings
$timeout = 50;
$fileOpen = 'w+';
$curl = curl_init();
$file = fopen (dirname(__FILE__) . '/'.$targetFile, $fileOpen);
@ZZromanZZ
ZZromanZZ / post-merge
Last active October 29, 2021 19:59
Composer install after change in GIT repository
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import subprocess
import string
import os
HOOK_DIR = os.path.dirname(os.path.realpath(__file__))
ROOT_DIR = os.path.dirname(os.path.dirname(HOOK_DIR))