* Strike the link to the redirect rather than using an asterisk in Special:Listredirects
* (bug 11355) Fix false positives in Safe Mode and other config detection
when boolean settings are disabled with 'Off' via php_admin_value/php_value
+* (bug 11292) Fixed unserialize errors with Postgres by creating special Blob object.
=== API changes in 1.12 ===
}
function encodeBlob( $b ) {
- return pg_escape_bytea( $b );
+ return new Blob ( pg_escape_bytea( $b ) ) ;
}
+
function decodeBlob( $b ) {
+ if ($b instanceof Blob) {
+ $b = $b->fetch();
+ }
return pg_unescape_bytea( $b );
}
function addQuotes( $s ) {
if ( is_null( $s ) ) {
return 'NULL';
- } else if (is_array( $s )) { ## Assume it is bytea data
- return "E'$s[1]'";
+ } else if ($s instanceof Blob) {
+ return "'".$s->fetch($s)."'";
}
return "'" . pg_escape_string($s) . "'";
- // Unreachable: return "E'" . pg_escape_string($s) . "'";
}
function quote_ident( $s ) {