bugfix: the slice page was broken when nobody is in slice
[plewww.git] / drupal-hacks / patch-session-inc.sh
1 #!/bin/bash
2
3 # for php8; the handler attached to session_destroy must now return a boolean
4 # the patched function is a one-liner
5 # so we find its declaration, go down one line (+), and then add a line
6
7 readonly filetopatch=/var/www/html/includes/session.inc
8
9 # do not patch twice
10 if ! grep -q 'patch-session_destroy' $filetopatch >& /dev/null; then
11     ed $filetopatch << EOF
12 /function sess_destroy
13 +
14 a
15   return TRUE; // patch-session_destroy for php8
16 .
17 wq
18 EOF
19 fi