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 | |
$app->foo = function() { echo 'test'; die;}; | |
$app->foo(); // ERROR | |
$f = $app->foo; | |
$f(); // SUCCESS | |
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
/* | |
compile with: | |
gcc -shared -fPIC fix_umask.c -o fix_umask.so | |
edit /usr/bin/subl to include (fix the path to fix_umask.so if necessary): | |
#!/bin/sh | |
export LD_PRELOAD=/opt/sublime_text/fix_umask.so | |
exec /opt/sublime_text/sublime_text "$@" |