Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix descripyion and price #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sgonchar67
Copy link

fix descripyion without tags and change requirement for price to float

Copy link
Owner

@notdest notdest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Наконец-то сел и посмотрел, что поменялось.

@@ -272,7 +272,7 @@ protected function newOffer( $id, $price, $currency, $category, $type, $from )
if( (!is_int($category)) || ($category<1) || ($category>=pow(10,19)) )
$this->exc("categoryId - целое число, не более 18 знаков");

if( !is_int($price) || $price<0 ) $this->exc("price должно быть целым и положительным");
if( !is_numeric($price) || $price<0 ) $this->exc("price должно быть положительным числом");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В идеале в файлах документации (вроде docs/simple.md ) еще заменить int на numeric

Comment on lines +128 to +137
$desc = new \DomElement( 'description');
if ($tags) {
$cdata = new \DOMCdataSection($txt);
$this->appendChild($desc);
$desc->appendChild($cdata);
} else {
$desc->textContent = $txt;
$this->appendChild($desc);
}
return $this;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это поправили в предыдущем PR, который уже влит. И там как-то компактнее, тут бросается в глаза два раза $this->appendChild($desc);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants