summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2012-06-13 00:36:52 -0400
committerspiderr <spider@viovio.com>2012-06-13 00:36:52 -0400
commit228d534ec87325047427872954c3c2a87dcfcdb4 (patch)
tree4e3d30c1ecd79d8dce9f86a06c648ef046da94ba
parentb3f35a7f307b55982ba00244959c2a2f0047ea71 (diff)
parentec10d2dfb0bf51f9f693e81b64efa29733a298de (diff)
downloadkernel-228d534ec87325047427872954c3c2a87dcfcdb4.tar.gz
kernel-228d534ec87325047427872954c3c2a87dcfcdb4.tar.bz2
kernel-228d534ec87325047427872954c3c2a87dcfcdb4.zip
Merge branch 'master' of github.com:bitweaver/kernel
-rw-r--r--BitBase.php3
-rw-r--r--bit_error_inc.php5
2 files changed, 5 insertions, 3 deletions
diff --git a/BitBase.php b/BitBase.php
index c960fac..bea4dcd 100644
--- a/BitBase.php
+++ b/BitBase.php
@@ -286,10 +286,11 @@ abstract class BitBase {
}
}
- if( empty( $pListHash['max_records'] )) {
+ if( empty( $pListHash['max_records'] ) || !is_numeric( $pListHash['max_records'] ) ) {
global $gBitSystem;
$pListHash['max_records'] = $gBitSystem->getConfig( "max_records", 10 );
}
+ $pListHash['max_records'] = (int)$pListHash['max_records'];
if( !isset( $pListHash['offset'] )) {
if( isset($pListHash['page'] )) {
diff --git a/bit_error_inc.php b/bit_error_inc.php
index d6e1bed..4e93bc3 100644
--- a/bit_error_inc.php
+++ b/bit_error_inc.php
@@ -56,7 +56,8 @@ function bit_error_handler ( $errno, $errstr, $errfile, $errline, $errcontext=NU
}
// Send an e-mail to the administrator
if( $errType && defined( 'ERROR_EMAIL' ) ) {
- $messageBody = $errType." [#$errno]: $errstr \n in $errfile on line $errline \n "."\n\n".bit_error_string( array( 'errno'=>$errno, 'db_msg'=>$errType ).vc( $errcontext, FALSE) );
+ global $gBitDb;
+ $messageBody = $errType." [#$errno]: $errstr \n in $errfile on line $errline \n ".$gBitDb->mDb->databaseType.'://'.$gBitDb->mDb->user.'@'.$gBitDb->mDb->host.'/'.$gBitDb->mDb->database."\n\n".bit_error_string( array( 'errno'=>$errno, 'db_msg'=>$errType ).vc( $errcontext, FALSE).vc( $_SERVER, FALSE ) );
mail( ERROR_EMAIL, 'PHP '.$errType.' on '.php_uname( 'n' ).': '.$errstr, $messageBody );
}
}
@@ -139,7 +140,7 @@ function bit_error_string( $iDBParms ) {
$info .= $indent."-----------------------------------------------------------------------------------------------".$separator;
$info .= $indent."#### USER AGENT: ".$_SERVER['HTTP_USER_AGENT'].$separator;
$info .= $indent."#### ACCT: ".$acctStr.$separator;
- $info .= $indent."#### URL: http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$separator;
+ $info .= $indent."#### URL: ".$_SERVER['SCRIPT_URI'].(!empty($_SERVER['QUERY_STRING'])?'?'.$_SERVER['QUERY_STRING']:'').$separator;
if( isset($_SERVER['HTTP_REFERER'] ) ) {
$info .= $indent."#### REFERRER: $_SERVER[HTTP_REFERER]".$separator;
}