Skip to content

Commit 14d9e47

Browse files
Lev ZeninLev Zenin
authored andcommitted
actualized calls
1 parent 75337d1 commit 14d9e47

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Source/phpClass.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ function class_call_method(method : zend_pchar; ht : integer; return_value : pzv
367367
M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
368368
M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
369369
if M.ZendVar.ISNull then //perform variant conversion
370-
variant2zval(M.ReturnValue, return_value);
370+
VariantToZend(M.ReturnValue, return_value);
371371

372372
end;
373373
end;

Source/phpModules.pas

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointe
265265
procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval;
266266
this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
267267
begin
268-
ZVAL(return_value);
268+
ZvalVal(return_value);
269269
if Assigned(Application) then
270270
try
271271
Application.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
@@ -407,22 +407,30 @@ function TCustomPHPExtension.FunctionByName(
407407

408408
procedure TCustomPHPExtension.phpwrite(str: zend_pchar; str_len: integer);
409409
begin
410+
{$IFNDEF PHP550}
410411
php_body_write(str, str_len, FTSRMLS);
412+
{$ENDIF}
411413
end;
412414

413415
procedure TCustomPHPExtension.phpwrite_h(str: zend_pchar; str_len: integer);
414416
begin
417+
{$IFNDEF PHP550}
415418
php_header_write(str, str_len, FTSRMLS);
419+
{$ENDIF}
416420
end;
417421

418422
procedure TCustomPHPExtension.puts(str: zend_pchar);
419423
begin
424+
{$IFNDEF PHP550}
420425
php_body_write(str, strlen(str), FTSRMLS);
426+
{$ENDIF}
421427
end;
422428

423429
procedure TCustomPHPExtension.puts_h(str: zend_pchar);
424430
begin
431+
{$IFNDEF PHP550}
425432
php_header_write(str, strlen(str), FTSRMLS);
433+
{$ENDIF}
426434
end;
427435

428436
procedure TCustomPHPExtension.ReportError(ErrType: integer;
@@ -466,6 +474,7 @@ procedure DoneVCLApplication;
466474
VCL.Forms.Application.ShowHint := False;
467475
VCL.Forms.Application.Destroying;
468476
VCL.Forms.Application.DestroyComponents;
477+
{$ENDIF}
469478
except
470479
end;
471480
end;
@@ -702,7 +711,7 @@ procedure TPHPApplication.HandleRequest(ht: integer; return_value : pzval; retu
702711
FZendVar.AsZendVariable := return_value;
703712
AFunction.OnExecute(DataModule, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
704713
if FZendVar.ISNull then
705-
variant2zval(ReturnValue, return_value);
714+
VariantToZend(ReturnValue, return_value);
706715
finally
707716
FZendVar.Free;
708717
end;

0 commit comments

Comments
 (0)