PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #6091

sqlite_escape_string

Details

Submitted2005-11-28 03:33 UTC
Frompear at justin dot meagerman dot net
StatusBogus
PackageDB
PHP Version4.4.0
OSlinux 2.6
Roadmaps(Not assigned)

Comments

[2005-11-28 03:33 UTC] pear at justin dot meagerman dot net

Description:
------------
sqlite_escape_string is not defined until PHP 5, yet it is used in sqlite.php in the method escapeSimple() in the DB package of pear.

This results in the script dying (without an error, because it is suppressed)

Test script:
---------------
<?php
require_once 'DB.php';
$db = &DB::connect('sqlite:///test.db');
echo("about to escape\n");
$str = $db->escapeSimple("hello");
echo("hello escaped to $str\n");
?>

Expected result:
----------------
"about to escape"
"hello escaped to hello"

Actual result:
--------------
"about to escape"

[2005-11-28 03:42 UTC] pear at justin dot meagerman dot net

turns out this is a bug in the documentation. This function is defined in php 5