com php-src: Fix undefined variable, and remove unused test-pdo: ext/pdo/pdo.php ext/phar/shortarc.php
| From: | Peter Kokot | Date: | Fri, 03 May 2019 16:14:32 +0000 |
| Subject: | com php-src: Fix undefined variable, and remove unused test-pdo: ext/pdo/pdo.php ext/phar/shortarc.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106028@lists.php.net to get a copy of this message | ||
Commit: ba0913a2e56c2d5f43b0f06373a79e33702e0f58
Author: peter279k <peter279k@gmail.com> Fri, 3 May 2019 16:22:57 +0800
Committer: Peter Kokot <peterkokot@gmail.com> Fri, 3 May 2019 18:14:32 +0200
Parents: a9e07b937cadfc8434e4ca05c41d6c67b65dea05
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ba0913a2e56c2d5f43b0f06373a79e33702e0f58
Log:
Fix undefined variable, and remove unused test-pdo
Changed paths:
D ext/pdo/pdo.php
M ext/phar/shortarc.php
Diff:
diff --git a/ext/pdo/pdo.php b/ext/pdo/pdo.php
deleted file mode 100755
index a11cb62..0000000
--- a/ext/pdo/pdo.php
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env php
-<?php
-dl('pdo.so');
-dl('pdo_sqlite.so');
-
-//$x = new PDO("oci:dbname=hostname", 'php', 'php');
-$x = new PDO("sqlite::memory:");
-
-$x->query("create table test(name string, value string)");
-debug_zval_dump($x);
-
-$stmt = $x->prepare("INSERT INTO test (NAME, VALUE) VALUES (:name, :value)");
-
-$stmt->bindParam(":name", $the_name, PDO_PARAM_STR, 32);
-$stmt->bindParam(":value", $the_value, PDO_PARAM_STR, 32);
-
-for ($i = 0; $i < 4; $i++) {
- $the_name = "foo" . rand();
- $the_value = "bar" . rand();
-
- if (!$stmt->execute()) {
- break;
- }
-}
-
-$stmt = null;
-
-echo "DEFAULT:\n";
-foreach ($x->query("select NAME, VALUE from test") as $row) {
- print_r($row);
-}
-
-echo "OBJ:\n";
-
-class Foo {
- public $NAME = "Don't change me";
-}
-
-$foo = new foo;
-
-foreach ($x->query("select NAME, VALUE from test", PDO_FETCH_COLUMN, 1) as $row) {
- debug_zval_dump($row);
-}
-
-echo "Done\n";
-exit;
-
-$stmt = $x->prepare("select NAME, VALUE from test where value like ?");
-$the_name = 'bar%';
-$stmt->execute(array($the_name)) or die("failed to execute!");
-$stmt->bindColumn('VALUE', $value);
-
-while ($row = $stmt->fetch()) {
- echo "name=$row[NAME] value=$row[VALUE]\n";
- echo "value is $value\n";
- echo "\n";
-}
-
-echo "Let's try an update\n";
-
-echo "All done\n";
-
-?>
diff --git a/ext/phar/shortarc.php b/ext/phar/shortarc.php
index 2c1f40d..2d0d37d 100644
--- a/ext/phar/shortarc.php
+++ b/ext/phar/shortarc.php
@@ -265,7 +265,7 @@ class Extract_Phar
if (strlen($data) != $entry[0]) {
die("Invalid internal .phar file (size error " . strlen($data) . " !=
" .
- $stat[7] . ")");
+ $entry[0] . ")");
}
if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) {