You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code there is immediately alarming and irresponsible. It should be removed from the project. What were they thinking!?
class FuncGenerator {
private $iFunc='',$iXFunc='',$iMin,$iMax,$iStepSize;
function __construct($aFunc,$aXFunc='') {
$this->iFunc = $aFunc;
$this->iXFunc = $aXFunc;
}
function E($aXMin,$aXMax,$aSteps=50) {
$this->iMin = $aXMin;
$this->iMax = $aXMax;
$this->iStepSize = ($aXMax-$aXMin)/$aSteps;
if( $this->iXFunc != '' )
$t = 'for($i='.$aXMin.'; $i<='.$aXMax.'; $i += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]='.$this->iXFunc.';}';
elseif( $this->iFunc != '' )
$t = 'for($x='.$aXMin.'; $x<='.$aXMax.'; $x += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]=$x;} $x='.$aXMax.';$ya[]='.$this->iFunc.';$xa[]=$x;';
else
JpGraphError::RaiseL(24001);//('FuncGenerator : No function specified. ');
@eval($t);
// If there is an error in the function specifcation this is the only
// way we can discover that.
if( empty($xa) || empty($ya) )
JpGraphError::RaiseL(24002);//('FuncGenerator : Syntax error in function specification ');
return array($xa,$ya);
}
}
The text was updated successfully, but these errors were encountered:
Please have a look at the "E()" method of FuncGenerator class.
jpgraph/src/util/FuncGenerator.php
Line 23 in b51f7ee
The code there is immediately alarming and irresponsible. It should be removed from the project. What were they thinking!?
The text was updated successfully, but these errors were encountered: