I hereby claim:
- I am wjzijderveld on github.
- I am wjzijderveld (https://keybase.io/wjzijderveld) on keybase.
- I have a public key whose fingerprint is 6F51 FBF3 BA51 8264 9038 DAD6 BC36 7471 B018 E4E6
To claim this, I am signing this object:
#!/bin/sh | |
set -euo pipefail | |
# vault-merge | |
# Benjamin Ragheb <ben@benzado.com> | |
# This shell script handles conflicts generated by attempts to merge encrypted | |
# Ansible Vault files. Run `git merge` as usual; when git warns of a merge | |
# conflict, run this command to attempt a merge on the unencrypted versions of |
# ~/.weechat-naughty-notifier.conf | |
variables: | |
blue: "#0060a0" | |
gray: "#606060" | |
green: "#00a020" | |
purple: "#600060" | |
red: "#a00020" | |
color_default: ${green} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
// assumes $form available and $this->validator injected | |
// ConstraintViolationList | |
$violationList = $this->validator->validate($form); | |
$violationMapper = new ViolationMapper(); | |
foreach ($violationList as $violation) { | |
$violationMapper->mapViolation($violation, $form); | |
} |
<?php | |
function xpathEscape($query,$default_delim = '"') | |
{ | |
if((strpos($query,'\'') !== FALSE) || | |
(strpos($query,'"') !== FALSE)) | |
{ | |
$quotechars = array('\'','"'); | |
$parts = array(); | |
$current_part = ''; |
I'll try to explain: | |
We have ProductTaxonomyTerm and CategoryTaxonomyTerm, which both extend BaseTaxonomyTerm. | |
BaseTaxonomyTerm is configured with SingleTableInheritance with a discriminator column type. | |
Local env works without issues, but on our staging it sometimes happens, that the ClassMetaData is 'corrupt'. | |
The Base/Category (in this example) metadata looks fine (when I look at the value stored in APC), but the ProductTaxonomyTerm has no parentClasses defined anymore (in ClassMetadata). | |
Apache graceful (APC clear) solves the issue, but only half. The problem re-arises on another website (we have a mutli-site solution), which site it is, seems pure random. | |
The missing parentClasses causes, that Doctrine generates a faulty SQL query (empty WHERE IN()). |
<?php | |
//Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout | |
//Usage: Exactly as PHP's SoapClient class, except that 3 new options are available: | |
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout | |
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout | |
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate | |
class SoapClientTimeout extends SoapClient | |
{ | |
private $timeout = 0; | |
private $connecttimeout = 0; |