08-13-2012, 03:29 PM
Hi guys, need help fixing error :
Fatal error: Cannot break/continue 1 level in /home/sks/public_html/skps/classes/payment.php on line 238
$this->setInfo( $lng['payments']['transaction_already_processed'] );
}
else if ( !$this->getManual( ) )
{
line 238: break;
}
else
{
FULL FUNCTION:
Thanks all for helping fix that error
Fatal error: Cannot break/continue 1 level in /home/sks/public_html/skps/classes/payment.php on line 238
$this->setInfo( $lng['payments']['transaction_already_processed'] );
}
else if ( !$this->getManual( ) )
{
line 238: break;
}
else
{
FULL FUNCTION:
Code:
public function process( )
{
global $db;
global $lng;
if ( $this->payment_processor['recurring'] <= 0 || !$this->pay->isAutoRenew( ) )
{
$completed = $db->fetchRow( "select completed from ".TABLE_PAYMENT_ACTIONS." where ukey = '".$this->user_key."'" );
if ( $completed )
{
$this->setInfo( $lng['payments']['transaction_already_processed'] );
}
else if ( !$this->getManual( ) )
{
break;
}
else
{
$exists = $db->fetchRow( "select count(*) from ".$this->pay->getRetTable( )." where ukey = '".$this->user_key."'" );
if ( !$exists )
{
//break;
$this->setInfo( $lng['payments']['transaction_already_processed'] );
}
else
{
break;
}
}
}
else
{
do
{
do
{
$this->user_key = "";
} while ( 0 );
} while ( 0 );
$success = $this->pay->process( );
if ( $success )
{
if ( !$this->pending )
{
$this->pending = $this->pay->getPending( );
}
$this->paymentDone( );
}
else
{
$this->setInfo( $lng[$this->processor]['invalid_transaction'] );
}
}
}