This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
/** | |
* Crache du XML, yay. | |
*/ | |
class XmlRequestWriter | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Run in folder where to scan: | |
* php -f /path/to/duplicated_functions.php | |
* | |
* For more detailed debug information: | |
* DEBUG=1 php -f /path/to/duplicated_functions.php | |
*/ | |
declare (strict_types=1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function usage($programeName) { | |
echo <<<EOT | |
Usage: | |
{$programeName} TRACE_FILE | |
EOT; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see \Symfony\Component\HttpKernel\Controller\ErrorController | |
*/ | |
final class ErrorController | |
{ | |
private bool $debug = false; | |
private ErrorRendererInterface $errorRenderer; | |
private Environment $twig; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Maps PHP native types to normalized names | |
*/ | |
interface TypeMap | |
{ | |
const TYPE_ARRAY = 'array'; | |
const TYPE_NULL = 'null'; | |
const TYPE_STRING = 'string'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "`id -u`" != "0" ]; then | |
echo "Script must be run as root" | |
exit 1 | |
fi | |
IGNORE_BIN=0 | |
ROOT_PATH=`pwd` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function applyIBANMaks(input) { | |
var mask = '____ ____ ____ ____ ____ ____ ____'.split(''); | |
var cursorPositionDelta = 0; | |
function strip(value) { | |
return value.split('').filter(function (chr) { | |
return /[a-zA-Z\d]/.test(chr); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Generate test data for performance test | |
$testData = []; | |
$words = ['..', 'test', 'pouet', '/', '..', '', 'usr', 'bin', 'firefox', 'do not', 'panic', 'secret', 'perso', 'private', 'foo', '/', '..', '', 'hyper long word', 'word with space', 'some56457', '@ert', '.ezrzer', 'cassoulet', '/', '..', '']; | |
for ($i = 0; $i < 100; ++$i) { | |
$value = []; | |
$count = rand(0, 20); | |
for ($j = 1; $j < $count; ++$j) { | |
$value[] = $words[rand(0, count($words) - 1)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit f3c67888421b31f71ae0a8cabb5259676150baa4 | |
Author: Pierre Rineau <[email protected]> | |
Date: Wed Mar 28 22:24:01 2018 +0200 | |
https://www.drupal.org/sa-core-2018-002 backport from Drupal 7 | |
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc | |
index 23179ca98d..c14d966d86 100644 | |
--- a/includes/bootstrap.inc | |
+++ b/includes/bootstrap.inc |
NewerOlder