Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

CS fixes to match context of other redbean code #141

Merged
merged 1 commit into from

2 participants

@damianb

Minor changes, does not change functionality.

@damianb

Question regarding lines 149 and 160 - specifically, this:

    $value < 2147483648

Why not use PHP_INT_MAX instead? Is there a reason for using the 32-bit maximum integer value specifically, even when PHP may be a 64 bit build? (just curious)

@gabordemooij gabordemooij merged commit a6af947 into gabordemooij:master
@gabordemooij gabordemooij referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@mozey mozey referenced this pull request
Closed

RPDO.php and PHP_INT_MAX #386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 24, 2012
  1. @damianb
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 RedBean/Driver/PDO.php
View
7 RedBean/Driver/PDO.php
@@ -86,7 +86,7 @@ class RedBean_Driver_PDO implements RedBean_Driver {
*
* @return void
*/
- public function __construct($dsn, $user = NULL, $pass = NULL) {
+ public function __construct($dsn, $user = null, $pass = null) {
if ($dsn instanceof PDO) {
$this->pdo = $dsn;
$this->isConnected = true;
@@ -125,7 +125,7 @@ public function connect() {
)
);
- $this->pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, TRUE);
+ $this->pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
$this->isConnected = true;
}
@@ -145,7 +145,8 @@ protected function bindParams($s,$aValues) {
if (is_null($value)){
$s->bindValue($key+1,null,PDO::PARAM_NULL);
- }elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
+ }
+ elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
$s->bindParam($key+1,$value,PDO::PARAM_INT);
}
else {
Something went wrong with that request. Please try again.